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>2001-05-17 17:31:45 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-05-17 17:31:45 +0400
commit4293884185ef22d39b53c1e550c980df8921f6a5 (patch)
treecc9ad77b09e429c2bdb66c3ded829ddb89477323 /winsup/cygwin/security.cc
parent990577f0bd8a1257dab32828988b16269be499aa (diff)
* security.cc (cygwin_set_impersonation_token): Never destroy
previous token object. (subauth): Create token source with well defined identifier.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r--winsup/cygwin/security.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index 934b8155d..17bb6dd88 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -52,8 +52,6 @@ cygwin_set_impersonation_token (const HANDLE hToken)
debug_printf ("set_impersonation_token (%d)", hToken);
if (cygheap->user.token != hToken)
{
- if (cygheap->user.token != INVALID_HANDLE_VALUE)
- CloseHandle (cygheap->user.token);
cygheap->user.token = hToken;
cygheap->user.impersonated = FALSE;
}
@@ -215,7 +213,8 @@ subauth (struct passwd *pw)
str2buf2lsa (origin.str, origin.buf, "Cygwin");
/* Create token source. */
memcpy(ts.SourceName, "Cygwin.1", 8);
- AllocateLocallyUniqueId(&ts.SourceIdentifier);
+ ts.SourceIdentifier.HighPart = 0;
+ ts.SourceIdentifier.LowPart = 0x0100;
/* Get user information. */
extract_nt_dom_user (pw, nt_domain, nt_user);
/* Fill subauth with values. */