aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/uinfo.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-07-01 17:30:35 +0000
committerCorinna Vinschen <corinna@vinschen.de>2000-07-01 17:30:35 +0000
commitebbd4e8fb3078f8393567ca49d80d7fd5926f5f3 (patch)
tree12eeb80b70d079c01f7ee62c079f00620eb1be7c /winsup/cygwin/uinfo.cc
parent51b2ec5d032fdc80dd51fbde0271b8b743f4bd2b (diff)
downloadnewlib-ebbd4e8fb3078f8393567ca49d80d7fd5926f5f3.zip
newlib-ebbd4e8fb3078f8393567ca49d80d7fd5926f5f3.tar.gz
newlib-ebbd4e8fb3078f8393567ca49d80d7fd5926f5f3.tar.bz2
Changes by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* assert.cc (__assert): Reduce dependency on newlib. * exec.cc: Eliminate unnecessary inclusion of ctype.h. * glob.c: Ditto. * hinfo.cc: Ditto. * init.cc: Ditto. * strace.cc: Ditto. * tty.cc: Ditto. * grp.cc (parse_grp): Eliminate atoi. * passwd.cc (grab_int): Ditto. * grp.cc (getgroups): Eliminate str{n,}casecmp. * path.cc (get_raw_device_number): Ditto. * path.cc (sort_by_native_name): Ditto. * spawn.cc (iscmd): Ditto. * uinfo.cc (internal_getlogin): Ditto.
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 e2d07cc..a643d83 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -41,7 +41,7 @@ internal_getlogin (struct pinfo *pi)
if ((env = getenv ("USERDOMAIN")) != NULL)
strcpy (pi->domain, env);
/* Trust only if usernames are identical */
- if (!strcasecmp (pi->username, buf) && pi->domain[0] && pi->logsrv[0])
+ if (strcasematch (pi->username, buf) && pi->domain[0] && pi->logsrv[0])
debug_printf ("Domain: %s, Logon Server: %s", pi->domain, pi->logsrv);
/* If that failed, try to get that info from NetBIOS */
else if (!NetWkstaUserGetInfo (NULL, 1, (LPBYTE *)&wui))
@@ -53,7 +53,7 @@ internal_getlogin (struct pinfo *pi)
wcstombs (pi->domain, wui->wkui1_logon_domain,
(wcslen (wui->wkui1_logon_domain) + 1) * sizeof (WCHAR));
/* Save values in environment */
- if (strcasecmp (pi->username, "SYSTEM")
+ if (!strcasematch (pi->username, "SYSTEM")
&& pi->domain[0] && pi->logsrv[0])
{
LPUSER_INFO_3 ui = NULL;
@@ -139,7 +139,7 @@ internal_getlogin (struct pinfo *pi)
PSID psid = (PSID) psidbuf;
pi->psid = (PSID) pi->sidbuf;
- if (strcasecmp (pi->username, "SYSTEM")
+ if (!strcasematch (pi->username, "SYSTEM")
&& pi->domain[0] && pi->logsrv[0])
{
if (get_registry_hive_path (pi->psid, buf))