diff options
author | Zoltan Varga <vargaz@gmail.com> | 2005-02-09 01:19:20 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2005-02-09 01:19:20 +0300 |
commit | fe1aa3d23dbe023522a53ab77c69fdf433a87c31 (patch) | |
tree | 1c25a3bfdd0c93643896c35cd60c77a6f1c3ef3c /support | |
parent | 83e8aa072eca9ec0bd2db896b2a047de207124cf (diff) |
2005-02-08 Zoltan Varga <vargaz@freemail.hu>
* pwd.c (Mono_Posix_Syscall_getpwnam_r): Add another part missing from the last patch.
svn path=/trunk/mono/; revision=40319
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 4 | ||||
-rw-r--r-- | support/pwd.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index 8b6c02ee21c..1efbde20e63 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,7 @@ +2005-02-08 Zoltan Varga <vargaz@freemail.hu> + + * pwd.c (Mono_Posix_Syscall_getpwnam_r): Add another part missing from the last patch. + 2005-02-07 Jonathan Pryor <jonpryor@vt.edu> * grp.c: Oops. Didn't see other Solaris fix in #72292. diff --git a/support/pwd.c b/support/pwd.c index 6fa91dcee4c..32d8f94fdd1 100644 --- a/support/pwd.c +++ b/support/pwd.c @@ -146,6 +146,10 @@ Mono_Posix_Syscall_getpwnam_r (const char *name, } while ((r = getpwnam_r (name, &_pwbuf, buf, buflen, pwbufp)) && recheck_range (r)); + if (r == 0 && !(*pwbufp)) + /* On solaris, this function returns 0 even if the entry was not found */ + r = errno = ENOENT; + if (r == 0 && copy_passwd (pwbuf, &_pwbuf) == -1) r = errno = ENOMEM; free (buf); |