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>2019-02-23 19:24:05 +0300
committerCorinna Vinschen <corinna@vinschen.de>2019-02-23 19:24:05 +0300
commit13b1f9c0d1c6860be91523289c8a6ac6a87cb9db (patch)
treea0d4417f4a495547725c32227ba2bfcb57d710e5
parent322ab51659dbac7ff6b5a6aa5bfb3099a7e11681 (diff)
Cygwin: seteuid32: don't use INVALID_HANDLE_VALUE
NULL is the natural state of an unused handle Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/syscalls.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index f4e8bcf2c..172b7c4f6 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -3479,7 +3479,7 @@ seteuid32 (uid_t uid)
cygsid usersid;
user_groups &groups = cygheap->user.groups;
- HANDLE new_token = INVALID_HANDLE_VALUE;
+ HANDLE new_token = NULL;
struct passwd * pw_new;
bool token_is_internal, issamesid = false;
@@ -3550,7 +3550,7 @@ seteuid32 (uid_t uid)
/* If no impersonation token is available, try to authenticate using
LSA private data stored password, LSA authentication using our own
LSA module, or, as last chance, NtCreateToken. */
- if (new_token == INVALID_HANDLE_VALUE)
+ if (new_token == NULL)
{
new_token = lsaprivkeyauth (pw_new);
if (new_token)