summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nss/aliases.c1
-rw-r--r--nss/common.h2
-rw-r--r--nss/passwd.c3
3 files changed, 5 insertions, 1 deletions
diff --git a/nss/aliases.c b/nss/aliases.c
index 7436656..2618faf 100644
--- a/nss/aliases.c
+++ b/nss/aliases.c
@@ -82,6 +82,7 @@ enum nss_status _nss_ldap_setaliasent(void)
enum nss_status _nss_ldap_getaliasent_r(struct aliasent *result,char *buffer,size_t buflen,int *errnop)
{
+ *errnop=ENOENT;
return NSS_STATUS_UNAVAIL;
}
diff --git a/nss/common.h b/nss/common.h
index dbf0758..f3465dd 100644
--- a/nss/common.h
+++ b/nss/common.h
@@ -33,7 +33,7 @@ enum nss_status nslcd2nss(int code);
NSS specific due to the return codes */
#define ERROR_OUT_OPENERROR \
- *errnop=errno; \
+ *errnop=ENOENT; \
return NSS_STATUS_UNAVAIL;
#define ERROR_OUT_READERROR(fp) \
diff --git a/nss/passwd.c b/nss/passwd.c
index 94e3a81..53332fd 100644
--- a/nss/passwd.c
+++ b/nss/passwd.c
@@ -112,7 +112,10 @@ enum nss_status _nss_ldap_getpwent_r(struct passwd *result,char *buffer,size_t b
size_t bufptr=0;
/* check that we have a valid file descriptor */
if (fp==NULL)
+ {
+ *errnop=ENOENT;
return NSS_STATUS_UNAVAIL;
+ }
/* read a response */
READ_RESPONSE(fp);
LDF_PASSWD;