diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-29 06:50:17 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-29 06:50:17 +0000 |
commit | 38bc119696ba49314fdb3967767b799a9503a358 (patch) | |
tree | e5078bcea65547705a7012a54cbf307f26988718 | |
parent | 664075a3bb1796ddc4254fcf9a85b98972e03681 (diff) | |
download | newlib-38bc119696ba49314fdb3967767b799a9503a358.zip newlib-38bc119696ba49314fdb3967767b799a9503a358.tar.gz newlib-38bc119696ba49314fdb3967767b799a9503a358.tar.bz2 |
* uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are sorta
useless.
(cygheap_user::env_domain): Recalculate if name is missing.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/uinfo.cc | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9800f1c..627db82 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2002-06-29 Christopher Faylor <cgf@redhat.com> + * uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are + sorta useless. + (cygheap_user::env_domain): Recalculate if name is missing. + +2002-06-29 Christopher Faylor <cgf@redhat.com> + * environ.cc (spenv::from_cygheap): Still need to take setuid into consideration. diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 9fc336d..ae50004 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -309,7 +309,7 @@ cygheap_user::test_uid (char *&what, const char *name, size_t namelen) if (what) return what; if (orig_uid == myself->uid) - what = getwinenveq (name, namelen, HEAP_STR) ?: almost_null; + what = getwinenveq (name, namelen, HEAP_STR); return what; } @@ -332,7 +332,7 @@ cygheap_user::env_logsrv (const char *name, size_t namelen) const char * cygheap_user::env_domain (const char *name, size_t namelen) { - if (test_uid (pdomain, name, namelen)) + if (pwinname && test_uid (pdomain, name, namelen)) return pdomain; char username[UNLEN + 1]; |