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>2000-08-09 06:33:47 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-09 06:33:47 +0400
commit0072fdab860eb12ab2a454860a8c25ade253de6c (patch)
treefa970886fb81871f5714dbe2734ba91e40a7740a /winsup/cygwin/uinfo.cc
parentc51a2a8ba4b5d7fa3831303f2bf8611d23b52765 (diff)
* select.cc (allocfd_set): Zero allocated fd_set.
(cygwin_select): Move fd_set copying logic from ::wait to here. Use common return through sell.poll. (select_stuff::wait): Just return success or failure and let caller fill in fd_set. * pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since pinfo structure exists at random locations now. * fork.cc (fork): Use 'use_psid' element to control when the psid is relevant. * shared.cc (sec_user): Ditto. * spawn.cc (spawn_guts): Ditto. * uinfo.cc (internal_getlogin): Ditto. * syscall.cc (seteuid): Ditto. Set use_psid element.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 592ef36e9..d752d69ea 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -112,7 +112,7 @@ internal_getlogin (_pinfo *pi)
else if (!GetTokenInformation (ptok, TokenUser, (LPVOID) &tu,
sizeof tu, &siz))
debug_printf ("GetTokenInformation(): %E");
- else if (!(ret = CopySid (MAX_SID_LEN, (PSID) pi->sidbuf,
+ else if (!(ret = CopySid (MAX_SID_LEN, (PSID) pi->psid,
((TOKEN_USER *) &tu)->User.Sid)))
debug_printf ("Couldn't retrieve SID from access token!");
/* Close token only if it's a result from OpenProcessToken(). */
@@ -126,14 +126,14 @@ internal_getlogin (_pinfo *pi)
{
/* Concat DOMAIN\USERNAME for the next lookup */
strcat (strcat (strcpy (buf, pi->domain), "\\"), pi->username);
- if (!(ret = lookup_name (buf, NULL, (PSID) pi->sidbuf)))
+ if (!(ret = lookup_name (buf, NULL, (PSID) pi->psid)))
debug_printf ("Couldn't retrieve SID locally!");
}
/* If that failes, too, as a last resort try to get the SID from
the logon server. */
if (!ret && !(ret = lookup_name(pi->username, pi->logsrv,
- (PSID)pi->sidbuf)))
+ (PSID)pi->psid)))
debug_printf ("Couldn't retrieve SID from '%s'!", pi->logsrv);
/* If we have a SID, try to get the corresponding Cygwin user name
@@ -144,7 +144,7 @@ internal_getlogin (_pinfo *pi)
char psidbuf[MAX_SID_LEN];
PSID psid = (PSID) psidbuf;
- pi->psid = (PSID) pi->sidbuf;
+ pi->use_psid = 1;
if (!strcasematch (pi->username, "SYSTEM")
&& pi->domain[0] && pi->logsrv[0])
{