lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.1-4-g4897033

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd branch master updated. 0.9.1-4-g4897033



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  4897033a912d513be82268b20fe73190684960fe (commit)
       via  c9e2f9778e9267348bdfa4bf2a8d950bcf5fbd50 (commit)
      from  7140d2197ab2132b33553bacc5f8d8240ed13bbe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=4897033a912d513be82268b20fe73190684960fe

commit 4897033a912d513be82268b20fe73190684960fe
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Fri Aug 30 16:56:15 2013 +0200

    In nslcd, log EPIPE only on debug level
    
    See:
    https://bugzilla.redhat.com/show_bug.cgi?id=1003011

diff --git a/nslcd/common.h b/nslcd/common.h
index c848e36..393f695 100644
--- a/nslcd/common.h
+++ b/nslcd/common.h
@@ -44,7 +44,10 @@
    stream */
 
 #define ERROR_OUT_WRITEERROR(fp)                                            \
-  log_log(LOG_WARNING, "error writing to client: %s", strerror(errno));     \
+  if (errno == EPIPE)                                                       \
+    log_log(LOG_DEBUG, "error writing to client: %s", strerror(errno));     \
+  else                                                                      \
+    log_log(LOG_WARNING, "error writing to client: %s", strerror(errno));   \
   return -1;
 
 #define ERROR_OUT_READERROR(fp)                                             \

http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=c9e2f9778e9267348bdfa4bf2a8d950bcf5fbd50

commit c9e2f9778e9267348bdfa4bf2a8d950bcf5fbd50
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Fri Aug 30 16:55:30 2013 +0200

    Use a timeout when skipping remaining result data
    
    When the NSS modules closes the connection and skips any remaining
    result data, wait for up to 500 msec to read any available data.
    
    See:
    https://bugzilla.redhat.com/show_bug.cgi?id=1003011

diff --git a/common/tio.c b/common/tio.c
index 0039fd1..3b81a55 100644
--- a/common/tio.c
+++ b/common/tio.c
@@ -292,7 +292,7 @@ int tio_skip(TFILE *fp, size_t count)
 }
 
 /* Read all available data from the stream and empty the read buffer. */
-int tio_skipall(TFILE *fp)
+int tio_skipall(TFILE *fp, int skiptimeout)
 {
   struct pollfd fds[1];
   int rv;
@@ -312,7 +312,7 @@ int tio_skipall(TFILE *fp)
     /* see if any data is available */
     fds[0].fd = fp->fd;
     fds[0].events = POLLIN;
-    rv = poll(fds, 1, 0);
+    rv = poll(fds, 1, skiptimeout);
     /* check the poll() result */
     if (rv == 0)
       return 0; /* no file descriptor ready */
diff --git a/common/tio.h b/common/tio.h
index b489b2e..7723ee2 100644
--- a/common/tio.h
+++ b/common/tio.h
@@ -2,7 +2,7 @@
    tio.h - timed io functions
    This file is part of the nss-pam-ldapd library.
 
-   Copyright (C) 2007, 2008, 2010, 2012 Arthur de Jong
+   Copyright (C) 2007, 2008, 2010, 2012, 2013 Arthur de Jong
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -59,7 +59,7 @@ int tio_read(TFILE *fp, void *buf, size_t count);
 int tio_skip(TFILE *fp, size_t count);
 
 /* Read all available data from the stream and empty the read buffer. */
-int tio_skipall(TFILE *fp);
+int tio_skipall(TFILE *fp, int skiptimeout);
 
 /* Write the specified buffer to the stream. */
 int tio_write(TFILE *fp, const void *buf, size_t count);
diff --git a/nss/common.h b/nss/common.h
index 7c21484..254a5bb 100644
--- a/nss/common.h
+++ b/nss/common.h
@@ -2,7 +2,7 @@
    common.h - common functions for NSS lookups
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Arthur de Jong
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -35,6 +35,10 @@
 #include "solnss.h"
 #endif /* NSS_FLAVOUR_SOLARIS */
 
+/* skip timeout determines the maximum time to wait when closing the
+   connection and reading whatever data that is available */
+#define SKIP_TIMEOUT 500
+
 /* These are macros for handling read and write problems, they are
    NSS specific due to the return code so are defined here. They
    genrally close the open file, set an error code and return with
@@ -127,7 +131,7 @@
   /* close socket and we're done */                                         \
   if ((retv == NSS_STATUS_SUCCESS) || (retv == NSS_STATUS_TRYAGAIN))        \
   {                                                                         \
-    (void)tio_skipall(fp);                                                  \
+    (void)tio_skipall(fp, SKIP_TIMEOUT);                                    \
     (void)tio_close(fp);                                                    \
   }                                                                         \
   return retv;
@@ -188,7 +192,7 @@
   NSS_AVAILCHECK;                                                           \
   if (fp != NULL)                                                           \
   {                                                                         \
-    (void)tio_skipall(fp);                                                  \
+    (void)tio_skipall(fp, SKIP_TIMEOUT);                                    \
     (void)tio_close(fp);                                                    \
     fp = NULL;                                                              \
   }                                                                         \

-----------------------------------------------------------------------

Summary of changes:
 common/tio.c   |    4 ++--
 common/tio.h   |    4 ++--
 nslcd/common.h |    5 ++++-
 nss/common.h   |   10 +++++++---
 4 files changed, 15 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
nss-pam-ldapd
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/