mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 18:00:41 +00:00
[ADVAPI32] Add parameter checks to LogonUserExW and initialize the token handle.
This commit is contained in:
parent
b4040ea740
commit
5ebcc6cdc1
1 changed files with 18 additions and 3 deletions
|
@ -469,7 +469,21 @@ LogonUserExW(
|
||||||
NTSTATUS SubStatus = STATUS_SUCCESS;
|
NTSTATUS SubStatus = STATUS_SUCCESS;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
*phToken = NULL;
|
if ((ppProfileBuffer != NULL && pdwProfileLength == NULL) ||
|
||||||
|
(ppProfileBuffer == NULL && pdwProfileLength != NULL))
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ppProfileBuffer != NULL && pdwProfileLength != NULL)
|
||||||
|
{
|
||||||
|
*ppProfileBuffer = NULL;
|
||||||
|
*pdwProfileLength = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phToken != NULL)
|
||||||
|
*phToken = NULL;
|
||||||
|
|
||||||
switch (dwLogonType)
|
switch (dwLogonType)
|
||||||
{
|
{
|
||||||
|
@ -654,9 +668,10 @@ LogonUserExW(
|
||||||
TRACE("TokenHandle: %p\n", TokenHandle);
|
TRACE("TokenHandle: %p\n", TokenHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
*phToken = TokenHandle;
|
if (phToken != NULL)
|
||||||
|
*phToken = TokenHandle;
|
||||||
|
|
||||||
/* FIXME: return ppLogonSid, ppProfileBuffer, pdwProfileLength and pQuotaLimits */
|
/* FIXME: return ppLogonSid and pQuotaLimits */
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (ProfileBuffer != NULL)
|
if (ProfileBuffer != NULL)
|
||||||
|
|
Loading…
Reference in a new issue