From 0072fdab860eb12ab2a454860a8c25ade253de6c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 9 Aug 2000 02:33:47 +0000 Subject: * 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. --- winsup/cygwin/syscalls.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/syscalls.cc') diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 5698a9b72..e4a705c2d 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1865,7 +1865,6 @@ seteuid (uid_t uid) } struct _pinfo pi; - pi.psid = (PSID) pi.sidbuf; /* pi.token is used in internal_getlogin() to determine if impersonation is active. If so, the token is used for retrieving user's SID. */ @@ -1884,7 +1883,8 @@ seteuid (uid_t uid) strcpy (myself->username, pi.username); strcpy (myself->logsrv, pi.logsrv); strcpy (myself->domain, pi.domain); - memcpy (myself->sidbuf, pi.sidbuf, MAX_SID_LEN); + memcpy (myself->psid, pi.psid, MAX_SID_LEN); + myself->use_psid = 1; } } else -- cgit v1.2.3