From 4293884185ef22d39b53c1e550c980df8921f6a5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 17 May 2001 13:31:45 +0000 Subject: * security.cc (cygwin_set_impersonation_token): Never destroy previous token object. (subauth): Create token source with well defined identifier. --- winsup/cygwin/security.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/security.cc') 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. */ -- cgit v1.2.3