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>
This commit is contained in:
parent
322ab51659
commit
13b1f9c0d1
|
@ -3479,7 +3479,7 @@ seteuid32 (uid_t uid)
|
||||||
|
|
||||||
cygsid usersid;
|
cygsid usersid;
|
||||||
user_groups &groups = cygheap->user.groups;
|
user_groups &groups = cygheap->user.groups;
|
||||||
HANDLE new_token = INVALID_HANDLE_VALUE;
|
HANDLE new_token = NULL;
|
||||||
struct passwd * pw_new;
|
struct passwd * pw_new;
|
||||||
bool token_is_internal, issamesid = false;
|
bool token_is_internal, issamesid = false;
|
||||||
|
|
||||||
|
@ -3550,7 +3550,7 @@ seteuid32 (uid_t uid)
|
||||||
/* If no impersonation token is available, try to authenticate using
|
/* If no impersonation token is available, try to authenticate using
|
||||||
LSA private data stored password, LSA authentication using our own
|
LSA private data stored password, LSA authentication using our own
|
||||||
LSA module, or, as last chance, NtCreateToken. */
|
LSA module, or, as last chance, NtCreateToken. */
|
||||||
if (new_token == INVALID_HANDLE_VALUE)
|
if (new_token == NULL)
|
||||||
{
|
{
|
||||||
new_token = lsaprivkeyauth (pw_new);
|
new_token = lsaprivkeyauth (pw_new);
|
||||||
if (new_token)
|
if (new_token)
|
||||||
|
|
Loading…
Reference in New Issue