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-06-04 18:29:54 +0400
committerCorinna Vinschen <corinna@vinschen.de>2001-06-04 18:29:54 +0400
commitf7fa593d6b33a17dd543ea12df02625c409ecf0e (patch)
tree63021ea0fa9ffdd61294238ea7150b66d7671c7d /winsup/cygwin/uinfo.cc
parentac5561f2ed95d2ffcb81723d9556aadc1768ca04 (diff)
* cygheap.h (cygheap_user::cygheap_user): Initialize token to
INVALID_HANDLE_VALUE. * uinfo.cc (uinfo_init): Close token handle if needed.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index b024396e8..a3b734ebf 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -161,6 +161,8 @@ uinfo_init ()
Setting `impersonated' to TRUE seems to be wrong but it
isn't. Impersonated is thought as "Current User and `token'
are coincident". See seteuid() for the mechanism behind that. */
+ if (cygheap->user.token != INVALID_HANDLE_VALUE)
+ CloseHandle (cygheap->user.token);
cygheap->user.token = INVALID_HANDLE_VALUE;
cygheap->user.impersonated = TRUE;