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>2006-10-12 19:38:26 +0400
committerCorinna Vinschen <corinna@vinschen.de>2006-10-12 19:38:26 +0400
commit208e95c2f21078ea63f255374a8ea61151a981ea (patch)
tree744f9aa11a29d537fa2d5b95123529749e669d70 /winsup/cygwin/security.cc
parent0d94042d8f3a678181c2362c72fdfcafb936288d (diff)
* security.cc (create_token): Fix condition for source identifier.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r--winsup/cygwin/security.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index 618a57ef7..8080d3027 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -839,7 +839,8 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw,
TOKEN_STATISTICS stats;
memcpy (source.SourceName, "Cygwin.1", 8);
source.SourceIdentifier.HighPart = 0;
- source.SourceIdentifier.LowPart = (subauth_token ? 0x0102 : 0x0101);
+ source.SourceIdentifier.LowPart = (subauth_token != INVALID_HANDLE_VALUE
+ ? 0x0102 : 0x0101);
HANDLE token = INVALID_HANDLE_VALUE;
HANDLE primary_token = INVALID_HANDLE_VALUE;