Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-21 09:01:17 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-21 09:01:17 +0400
commit7c02f861e3512fac608b411cb5be43a41ba8735e (patch)
tree56618ecd163acfa86ea2c7dcd5a484cd0b9e3c5b /winsup/cygwin/uinfo.cc
parenta7b23a8f11b2e1f2ef333d2ed95d1c972acad12f (diff)
* uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
(cygheap_user::env_logsrv): Verify env_domain is valid. * environ.cc: Include child_info.h and keep spenvs[] sorted. (environ_init): Check child_proc_info instead of myself->ppid_handle.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 0eb7892b1..fe9e30db7 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -49,7 +49,7 @@ internal_getlogin (cygheap_user &user)
else if (!GetTokenInformation (ptok, TokenUser, &tu, sizeof tu, &siz))
system_printf ("GetTokenInformation(): %E");
else if (!(ret = user.set_sid (tu)))
- system_printf ("Couldn't retrieve SID from access token!");
+ system_printf ("Couldn't retrieve SID from access token!");
/* We must set the user name, uid and gid.
If we have a SID, try to get the corresponding Cygwin
password entry. Set user name which can be different
@@ -251,7 +251,7 @@ cygheap_user::ontherange (homebodies what, struct passwd *pw)
WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
sys_mbstowcs (wlogsrv, env_logsrv (),
sizeof (wlogsrv) / sizeof(*wlogsrv));
- sys_mbstowcs (wuser, name (), sizeof (wuser) / sizeof (*wuser));
+ sys_mbstowcs (wuser, env_name (), sizeof (wuser) / sizeof (*wuser));
if (!(ret = NetUserGetInfo (wlogsrv, wuser, 3,(LPBYTE *)&ui)))
{
char *p;
@@ -304,7 +304,7 @@ cygheap_user::env_logsrv ()
if (plogsrv)
return plogsrv;
- if (strcasematch (env_name (), "SYSTEM"))
+ if (!env_domain () || strcasematch (env_name (), "SYSTEM"))
return NULL;
char logsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];