mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 16:22:58 +00:00
[SAMSRV]
A password is present only if the passwords value has been set and the password is not the empty password. svn path=/trunk/; revision=60567
This commit is contained in:
parent
b7674bb164
commit
22175a9d82
1 changed files with 26 additions and 7 deletions
|
@ -6305,6 +6305,9 @@ SampQueryUserInternal1(PSAM_DB_OBJECT UserObject,
|
||||||
if (InfoBuffer == NULL)
|
if (InfoBuffer == NULL)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
|
InfoBuffer->Internal1.LmPasswordPresent = FALSE;
|
||||||
|
InfoBuffer->Internal1.NtPasswordPresent = FALSE;
|
||||||
|
|
||||||
/* Get the NT password */
|
/* Get the NT password */
|
||||||
Length = 0;
|
Length = 0;
|
||||||
SampGetObjectAttribute(UserObject,
|
SampGetObjectAttribute(UserObject,
|
||||||
|
@ -6322,9 +6325,13 @@ SampQueryUserInternal1(PSAM_DB_OBJECT UserObject,
|
||||||
&Length);
|
&Length);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
if (memcmp(&InfoBuffer->Internal1.EncryptedNtOwfPassword,
|
||||||
|
&EmptyNtHash,
|
||||||
|
sizeof(ENCRYPTED_NT_OWF_PASSWORD)))
|
||||||
|
InfoBuffer->Internal1.NtPasswordPresent = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfoBuffer->Internal1.NtPasswordPresent = (Length == sizeof(ENCRYPTED_NT_OWF_PASSWORD));
|
|
||||||
|
|
||||||
/* Get the LM password */
|
/* Get the LM password */
|
||||||
Length = 0;
|
Length = 0;
|
||||||
|
@ -6343,9 +6350,12 @@ SampQueryUserInternal1(PSAM_DB_OBJECT UserObject,
|
||||||
&Length);
|
&Length);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
}
|
|
||||||
|
|
||||||
InfoBuffer->Internal1.LmPasswordPresent = (Length == sizeof(ENCRYPTED_LM_OWF_PASSWORD));
|
if (memcmp(&InfoBuffer->Internal1.EncryptedLmOwfPassword,
|
||||||
|
&EmptyLmHash,
|
||||||
|
sizeof(ENCRYPTED_LM_OWF_PASSWORD)))
|
||||||
|
InfoBuffer->Internal1.LmPasswordPresent = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
InfoBuffer->Internal1.PasswordExpired = FALSE;
|
InfoBuffer->Internal1.PasswordExpired = FALSE;
|
||||||
|
|
||||||
|
@ -6709,6 +6719,9 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
/* Get the LmPassword and NtPassword attributes */
|
/* Get the LmPassword and NtPassword attributes */
|
||||||
if (InfoBuffer->All.WhichFields & (USER_ALL_NTPASSWORDPRESENT | USER_ALL_LMPASSWORDPRESENT))
|
if (InfoBuffer->All.WhichFields & (USER_ALL_NTPASSWORDPRESENT | USER_ALL_LMPASSWORDPRESENT))
|
||||||
{
|
{
|
||||||
|
InfoBuffer->All.LmPasswordPresent = FALSE;
|
||||||
|
InfoBuffer->All.NtPasswordPresent = FALSE;
|
||||||
|
|
||||||
/* Get the NT password */
|
/* Get the NT password */
|
||||||
Length = 0;
|
Length = 0;
|
||||||
SampGetObjectAttribute(UserObject,
|
SampGetObjectAttribute(UserObject,
|
||||||
|
@ -6717,8 +6730,6 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
NULL,
|
NULL,
|
||||||
&Length);
|
&Length);
|
||||||
|
|
||||||
InfoBuffer->All.NtPasswordPresent = (Length == sizeof(ENCRYPTED_NT_OWF_PASSWORD));
|
|
||||||
|
|
||||||
if (Length == sizeof(ENCRYPTED_NT_OWF_PASSWORD))
|
if (Length == sizeof(ENCRYPTED_NT_OWF_PASSWORD))
|
||||||
{
|
{
|
||||||
InfoBuffer->All.NtOwfPassword.Buffer = midl_user_allocate(sizeof(ENCRYPTED_NT_OWF_PASSWORD));
|
InfoBuffer->All.NtOwfPassword.Buffer = midl_user_allocate(sizeof(ENCRYPTED_NT_OWF_PASSWORD));
|
||||||
|
@ -6738,6 +6749,11 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
&Length);
|
&Length);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
if (memcmp(InfoBuffer->All.NtOwfPassword.Buffer,
|
||||||
|
&EmptyNtHash,
|
||||||
|
sizeof(ENCRYPTED_NT_OWF_PASSWORD)))
|
||||||
|
InfoBuffer->All.NtPasswordPresent = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the LM password */
|
/* Get the LM password */
|
||||||
|
@ -6748,8 +6764,6 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
NULL,
|
NULL,
|
||||||
&Length);
|
&Length);
|
||||||
|
|
||||||
InfoBuffer->All.LmPasswordPresent = (Length == sizeof(ENCRYPTED_LM_OWF_PASSWORD));
|
|
||||||
|
|
||||||
if (Length == sizeof(ENCRYPTED_LM_OWF_PASSWORD))
|
if (Length == sizeof(ENCRYPTED_LM_OWF_PASSWORD))
|
||||||
{
|
{
|
||||||
InfoBuffer->All.LmOwfPassword.Buffer = midl_user_allocate(sizeof(ENCRYPTED_LM_OWF_PASSWORD));
|
InfoBuffer->All.LmOwfPassword.Buffer = midl_user_allocate(sizeof(ENCRYPTED_LM_OWF_PASSWORD));
|
||||||
|
@ -6769,6 +6783,11 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
|
||||||
&Length);
|
&Length);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
if (memcmp(InfoBuffer->All.LmOwfPassword.Buffer,
|
||||||
|
&EmptyLmHash,
|
||||||
|
sizeof(ENCRYPTED_LM_OWF_PASSWORD)))
|
||||||
|
InfoBuffer->All.LmPasswordPresent = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue