* security.cc (subauth): Initialize user_token to NULL. Add comment.
This commit is contained in:
parent
e39a29e36b
commit
94dc73adc5
@ -1,3 +1,7 @@
|
|||||||
|
2006-08-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* security.cc (subauth): Initialize user_token to NULL. Add comment.
|
||||||
|
|
||||||
2006-08-11 Corinna Vinschen <corinna@vinschen.de>
|
2006-08-11 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* shared.cc (open_shared): Desperately try to get shared memory, only
|
* shared.cc (open_shared): Desperately try to get shared memory, only
|
||||||
|
@ -1009,7 +1009,10 @@ subauth (struct passwd *pw)
|
|||||||
QUOTA_LIMITS quota;
|
QUOTA_LIMITS quota;
|
||||||
char nt_domain[INTERNET_MAX_HOST_NAME_LENGTH + 1];
|
char nt_domain[INTERNET_MAX_HOST_NAME_LENGTH + 1];
|
||||||
char nt_user[UNLEN + 1];
|
char nt_user[UNLEN + 1];
|
||||||
HANDLE user_token = INVALID_HANDLE_VALUE;
|
/* Changed from INVALID_HANDLE_VALUE to NULL. A failed LsaLogonUser
|
||||||
|
sets the token to NULL anyway, so starting with NULL simplifies
|
||||||
|
the below test before calling CloseHandle. */
|
||||||
|
HANDLE user_token = NULL;
|
||||||
HANDLE primary_token = INVALID_HANDLE_VALUE;
|
HANDLE primary_token = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
push_self_privilege (SE_TCB_PRIV, true);
|
push_self_privilege (SE_TCB_PRIV, true);
|
||||||
@ -1076,7 +1079,7 @@ subauth (struct passwd *pw)
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
pop_self_privilege ();
|
pop_self_privilege ();
|
||||||
if (user_token != INVALID_HANDLE_VALUE)
|
if (user_token)
|
||||||
CloseHandle (user_token);
|
CloseHandle (user_token);
|
||||||
return primary_token;
|
return primary_token;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user