diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3a7328c30..b8aeca83c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2006-11-28 Corinna Vinschen + + * security.cc (create_token): Revert erroneous change to test + subauth_token for INVAILD_HANDLE_VALUE. + * syscalls.cc (seteuid32): Set create_token's subauth_token parameter + back to NULL. + 2006-11-28 Corinna Vinschen * fhandler.cc (fhandler_base::open): Fix previous patch to handle the diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 79c3c2f50..c5a8f5ca3 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -832,8 +832,7 @@ 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 != INVALID_HANDLE_VALUE - ? 0x0102 : 0x0101); + source.SourceIdentifier.LowPart = (subauth_token ? 0x0102 : 0x0101); HANDLE token = INVALID_HANDLE_VALUE; HANDLE primary_token = INVALID_HANDLE_VALUE; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 91c696073..3ca624e9a 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -2140,8 +2140,7 @@ seteuid32 (__uid32_t uid) } #else debug_printf ("lsaauth failed, try create_token."); - new_token = create_token (usersid, groups, pw_new, - INVALID_HANDLE_VALUE); + new_token = create_token (usersid, groups, pw_new, NULL); if (new_token == INVALID_HANDLE_VALUE) { debug_printf ("create_token failed, bail out of here");