Log Message: |
Merge r219635, r219667, r239390, r239574 from trunk:
* user/unix/userinfo.c (getpwnam_safe, apr_uid_name_get): Fix error
handling; always use the getpwnam_r return value as the error code,
and ignore errno, since POSIX does not require that getpwnam_r sets
errno.
* user/unix/groupinfo.c (apr_gid_name_get, apr_gid_get): Fix error
handling as above; and check for the NULL -> "no entry" cases here
too.
* test/testuser.c (fail_userinfo): Add test cases for error handling
(only one of them actually trips on the bugs in the old code with
glibc).
* user/unix/userinfo.c (getpwnam_safe, apr_uid_name_get): Fix error
handling for platforms which do not set errno on non-threadsafe
get{pw,gr}* failures; always return APR_ENOENT for that case.
* user/unix/groupinfo.c (apr_gid_name_get, apr_gid_get): Likewise.
PR: 34053
Submitted by: pquerna, jorton
|