OSDN Git Service

* uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are sorta
authorcgf <cgf>
Sat, 29 Jun 2002 06:50:16 +0000 (06:50 +0000)
committercgf <cgf>
Sat, 29 Jun 2002 06:50:16 +0000 (06:50 +0000)
useless.
(cygheap_user::env_domain): Recalculate if name is missing.

winsup/cygwin/ChangeLog
winsup/cygwin/uinfo.cc

index 9800f1c..627db82 100644 (file)
@@ -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.
 
index 9fc336d..ae50004 100644 (file)
@@ -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];