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:
authorCorinna Vinschen <corinna@vinschen.de>2007-07-17 00:01:15 +0400
committerCorinna Vinschen <corinna@vinschen.de>2007-07-17 00:01:15 +0400
commit77ee88050494f6fb0921f7d29c1a7ca7dfa7dcd7 (patch)
treed83fb4f7f01a80e7242fc24c90fbb184cbe94eda /winsup/cygwin/cygheap.h
parent6f76c68713a2bc3945cc4c3d27a5c266ed8284ca (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 58ed3739e..937230554 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -128,7 +128,7 @@ public:
HANDLE external_token;
HANDLE internal_token;
HANDLE curr_primary_token;
- HANDLE current_token;
+ HANDLE curr_imp_token;
/* CGF 2002-06-27. I removed the initializaton from this constructor
since this class is always allocated statically. That means that everything
@@ -176,9 +176,9 @@ public:
PSID saved_sid () { return saved_cygsid; }
const char *ontherange (homebodies what, struct passwd * = NULL);
#define NO_IMPERSONATION NULL
- bool issetuid () const { return current_token != NO_IMPERSONATION; }
+ bool issetuid () const { return curr_imp_token != NO_IMPERSONATION; }
HANDLE primary_token () { return curr_primary_token; }
- HANDLE token () { return current_token; }
+ HANDLE imp_token () { return curr_imp_token; }
void deimpersonate ()
{
RevertToSelf ();
@@ -186,7 +186,7 @@ public:
bool reimpersonate ()
{
if (issetuid ())
- return ImpersonateLoggedOnUser (token ());
+ return ImpersonateLoggedOnUser (primary_token ());
return true;
}
bool has_impersonation_tokens ()
@@ -195,8 +195,8 @@ public:
|| curr_primary_token != NO_IMPERSONATION; }
void close_impersonation_tokens ()
{
- if (current_token != NO_IMPERSONATION)
- CloseHandle (current_token);
+ if (curr_imp_token != NO_IMPERSONATION)
+ CloseHandle (curr_imp_token);
if (curr_primary_token != NO_IMPERSONATION
&& curr_primary_token != external_token
&& curr_primary_token != internal_token)