Skip to content
Snippets Groups Projects
Commit 2a8450cd authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

prefer EINVAL

parent b10f59f6
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ int youruid(uid_t *passto,char const *owner)
struct passwd *st ;
if (!(st = getpwnam(owner)) || errno)
{
if (!errno) errno = ESRCH ;
if (!errno) errno = EINVAL ;
return 0 ;
}
*passto = st->pw_uid ;
......@@ -40,7 +40,7 @@ int yourgid(gid_t *passto,uid_t owner)
struct passwd *st ;
if (!(st = getpwuid(owner)) || errno)
{
if (!errno) errno = ESRCH ;
if (!errno) errno = EINVAL ;
return 0 ;
}
*passto = st->pw_gid ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment