summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b7674bb)
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
if (InfoBuffer == NULL)
return STATUS_INSUFFICIENT_RESOURCES;
if (InfoBuffer == NULL)
return STATUS_INSUFFICIENT_RESOURCES;
+ InfoBuffer->Internal1.LmPasswordPresent = FALSE;
+ InfoBuffer->Internal1.NtPasswordPresent = FALSE;
+
/* Get the NT password */
Length = 0;
SampGetObjectAttribute(UserObject,
/* Get the NT password */
Length = 0;
SampGetObjectAttribute(UserObject,
&Length);
if (!NT_SUCCESS(Status))
goto done;
&Length);
if (!NT_SUCCESS(Status))
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 */
Length = 0;
/* Get the LM password */
Length = 0;
&Length);
if (!NT_SUCCESS(Status))
goto done;
&Length);
if (!NT_SUCCESS(Status))
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;
/* Get the LmPassword and NtPassword attributes */
if (InfoBuffer->All.WhichFields & (USER_ALL_NTPASSWORDPRESENT | USER_ALL_LMPASSWORDPRESENT))
{
/* Get the LmPassword and NtPassword attributes */
if (InfoBuffer->All.WhichFields & (USER_ALL_NTPASSWORDPRESENT | USER_ALL_LMPASSWORDPRESENT))
{
+ InfoBuffer->All.LmPasswordPresent = FALSE;
+ InfoBuffer->All.NtPasswordPresent = FALSE;
+
/* Get the NT password */
Length = 0;
SampGetObjectAttribute(UserObject,
/* Get the NT password */
Length = 0;
SampGetObjectAttribute(UserObject,
- InfoBuffer->All.NtPasswordPresent = (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));
if (Length == sizeof(ENCRYPTED_NT_OWF_PASSWORD))
{
InfoBuffer->All.NtOwfPassword.Buffer = midl_user_allocate(sizeof(ENCRYPTED_NT_OWF_PASSWORD));
&Length);
if (!NT_SUCCESS(Status))
goto done;
&Length);
if (!NT_SUCCESS(Status))
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 */
- InfoBuffer->All.LmPasswordPresent = (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));
if (Length == sizeof(ENCRYPTED_LM_OWF_PASSWORD))
{
InfoBuffer->All.LmOwfPassword.Buffer = midl_user_allocate(sizeof(ENCRYPTED_LM_OWF_PASSWORD));
&Length);
if (!NT_SUCCESS(Status))
goto done;
&Length);
if (!NT_SUCCESS(Status))
goto done;
+
+ if (memcmp(InfoBuffer->All.LmOwfPassword.Buffer,
+ &EmptyLmHash,
+ sizeof(ENCRYPTED_LM_OWF_PASSWORD)))
+ InfoBuffer->All.LmPasswordPresent = TRUE;