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; \