Merge two patches for cutting down EPIPE errors in nslcd into one, and try to cover other cases where the client doesn't flush its read buffer before hanging up on the server.
21 lines
695 B
Diff
21 lines
695 B
Diff
Try to reduce EPIPE errors in nslcd by reading any pending data before closing
|
|
our connection to the daemon, in the cases where we weren't already doing that.
|
|
--- nss-pam-ldapd-0.8.12/nss/common.h
|
|
+++ nss-pam-ldapd-0.8.12/nss/common.h
|
|
@@ -148,6 +148,7 @@
|
|
NSS_AVAILCHECK; \
|
|
if (fp!=NULL) \
|
|
{ \
|
|
+ (void)tio_skipall(fp); \
|
|
(void)tio_close(fp); \
|
|
fp=NULL; \
|
|
} \
|
|
@@ -182,6 +183,7 @@
|
|
/* 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_skipall(fp); \
|
|
tio_close(fp); \
|
|
fp=NULL; \
|
|
*errnop=EINVAL; \
|