* cygheap.h (cygheap_user::curr_imp_token): Rename from current_token.

Accommodate changge throughout Cygwin.
	(cygheap_user::imp_token): Rename from token.  Accommodate changge
	throughout Cygwin.
	(rcygheap_user::eimpersonate): Use primary token for impersonation.
	* grp.cc (internal_getgroups): Use primary impersonation token when
	impersonated.
	* security.h (_push_thread_privilege): Use primary impersonation token
	when impersonated.
This commit is contained in:
Corinna Vinschen
2007-07-16 20:01:15 +00:00
parent 6f76c68713
commit 77ee880504
7 changed files with 28 additions and 16 deletions

View File

@@ -1943,7 +1943,7 @@ check_access (security_descriptor &sd, GENERIC_MAPPING &mapping,
DWORD granted;
DWORD plen = sizeof (PRIVILEGE_SET) + 3 * sizeof (LUID_AND_ATTRIBUTES);
PPRIVILEGE_SET pset = (PPRIVILEGE_SET) alloca (plen);
HANDLE tok = cygheap->user.issetuid () ? cygheap->user.token ()
HANDLE tok = cygheap->user.issetuid () ? cygheap->user.imp_token ()
: hProcImpToken;
if (!tok && !DuplicateTokenEx (hProcToken, MAXIMUM_ALLOWED, NULL,