nss-pam-ldapd commit: r1638 - nss-pam-ldapd/nss
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1638 - nss-pam-ldapd/nss
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1638 - nss-pam-ldapd/nss
- Date: Fri, 16 Mar 2012 09:28:02 +0100 (CET)
Author: arthur
Date: Fri Mar 16 09:28:02 2012
New Revision: 1638
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1638&view=revision
Log:
put both tio_skip() and tio_close() within if (fixes r1637) and clarify
documentation of one part of the code
Modified:
nss-pam-ldapd/nss/common.h
Modified: nss-pam-ldapd/nss/common.h
==============================================================================
--- nss-pam-ldapd/nss/common.h Wed Mar 14 21:31:38 2012 (r1637)
+++ nss-pam-ldapd/nss/common.h Fri Mar 16 09:28:02 2012 (r1638)
@@ -147,8 +147,10 @@
retv=readfn; \
/* close socket and we're done */ \
if ((retv==NSS_STATUS_SUCCESS)||(retv==NSS_STATUS_TRYAGAIN)) \
+ { \
(void)tio_skip(fp,0); /* read any buffered data */ \
(void)tio_close(fp); \
+ } \
return retv;
/* This macro can be used to generate a get..byname() function
@@ -203,9 +205,11 @@
/* if we have a full buffer try to reset the stream */ \
if (tio_reset(fp)) \
{ \
+ /* reset failed, we close and give up with a permanent error \
+ because we cannot retry just the getent() call because it \
+ may not be only the first entry that failed */ \
tio_close(fp); \
fp=NULL; \
- /* fail with permanent error to prevent retries */ \
*errnop=EINVAL; \
return NSS_STATUS_UNAVAIL; \
} \
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1638 - nss-pam-ldapd/nss,
Commits of the nss-pam-ldapd project