lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1944 - nss-pam-ldapd-0.8/nss

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

nss-pam-ldapd commit: r1944 - nss-pam-ldapd-0.8/nss



Author: arthur
Date: Sun Apr 28 15:14:21 2013
New Revision: 1944
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1944&view=revision

Log:
return NSS_STATUS_TRYAGAIN on zero-length (but not-NULL) buffer (thanks Jakub 
Hrozek) (f21efd6 from 0.9)

Modified:
   nss-pam-ldapd-0.8/nss/common.h

Modified: nss-pam-ldapd-0.8/nss/common.h
==============================================================================
--- nss-pam-ldapd-0.8/nss/common.h      Sun Apr 28 14:54:06 2013        (r1943)
+++ nss-pam-ldapd-0.8/nss/common.h      Sun Apr 28 15:14:21 2013        (r1944)
@@ -86,10 +86,15 @@
 
 /* check validity of passed buffer (Glibc flavour) */
 #define NSS_BUFCHECK \
-  if ((buffer==NULL)||(buflen==0)) \
+  if (buffer==NULL) \
   { \
     *errnop=EINVAL; \
     return NSS_STATUS_UNAVAIL; \
+  } \
+  if (buflen==0) \
+  { \
+    *errnop=ERANGE; \
+    return NSS_STATUS_TRYAGAIN; \
   }
 
 #endif /* NSS_FLAVOUR_GLIBC */
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/