diff options
Diffstat (limited to 'nis/nss_nis/nis-spwd.c')
-rw-r--r-- | nis/nss_nis/nis-spwd.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nis/nss_nis/nis-spwd.c b/nis/nss_nis/nis-spwd.c index 5be010d433..452f91dc0b 100644 --- a/nis/nss_nis/nis-spwd.c +++ b/nis/nss_nis/nis-spwd.c @@ -166,7 +166,7 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp, if (name == NULL) { - __set_errno (EINVAL); + *errnop = EINVAL; return NSS_STATUS_UNAVAIL; } @@ -197,11 +197,12 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp, free (result); parse_res = _nss_files_parse_spent (p, sp, data, buflen, errnop); - if (parse_res == -1) - return NSS_STATUS_TRYAGAIN; - - if (parse_res) - return NSS_STATUS_SUCCESS; - else - return NSS_STATUS_NOTFOUND; + if (parse_res < 1) + { + if (parse_res == -1) + return NSS_STATUS_TRYAGAIN; + else + return NSS_STATUS_NOTFOUND; + } + return NSS_STATUS_SUCCESS; } |