mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 23:00:22 +00:00
(getpwuid_plusgroup): Correct returned errno value in some cases.
This commit is contained in:
parent
b3a8ee0397
commit
6909f6e6a0
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
|
||||
|
||||
@ -873,7 +873,10 @@ getpwnam_plususer (const char *name, struct passwd *result, ent_t *ent,
|
||||
int outvallen;
|
||||
|
||||
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
|
||||
{
|
||||
*errnop = ENOENT;
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (yp_match (domain, "passwd.byname", name, strlen (name),
|
||||
&outval, &outvallen) != YPERR_SUCCESS)
|
||||
@ -1376,8 +1379,8 @@ getpwuid_plususer (uid_t uid, struct passwd *result, char *buffer,
|
||||
|
||||
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
*errnop = ENOENT;
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
sprintf (buf, "%d", uid);
|
||||
@ -1385,8 +1388,8 @@ getpwuid_plususer (uid_t uid, struct passwd *result, char *buffer,
|
||||
&outval, &outvallen)
|
||||
!= YPERR_SUCCESS)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
*errnop = ENOENT;
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (insert_passwd_adjunct (&outval, &outvallen, domain, errnop)
|
||||
|
Loading…
Reference in New Issue
Block a user