mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 01:10:26 +00:00
[SAMSRV]
Implement SamrGetDomainPasswordInformation. svn path=/trunk/; revision=71365
This commit is contained in:
parent
c26a5012b8
commit
b666112fa1
1 changed files with 54 additions and 2 deletions
|
@ -9212,6 +9212,7 @@ SamrUnicodeChangePasswordUser2(IN handle_t BindingHandle,
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Function 56 */
|
/* Function 56 */
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
@ -9219,8 +9220,59 @@ SamrGetDomainPasswordInformation(IN handle_t BindingHandle,
|
||||||
IN PRPC_UNICODE_STRING Unused,
|
IN PRPC_UNICODE_STRING Unused,
|
||||||
OUT PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation)
|
OUT PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
SAMPR_HANDLE ServerHandle = NULL;
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
PSAM_DB_OBJECT DomainObject = NULL;
|
||||||
|
SAM_DOMAIN_FIXED_DATA FixedData;
|
||||||
|
ULONG Length;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
TRACE("(%p %p %p)\n", BindingHandle, Unused, PasswordInformation);
|
||||||
|
|
||||||
|
Status = SamrConnect(NULL,
|
||||||
|
&ServerHandle,
|
||||||
|
SAM_SERVER_LOOKUP_DOMAIN);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
TRACE("SamrConnect() failed (Status 0x%08lx)\n", Status);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = SampOpenDbObject((PSAM_DB_OBJECT)ServerHandle,
|
||||||
|
L"Domains",
|
||||||
|
L"Account",
|
||||||
|
0,
|
||||||
|
SamDbDomainObject,
|
||||||
|
DOMAIN_READ_PASSWORD_PARAMETERS,
|
||||||
|
&DomainObject);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
TRACE("SampOpenDbObject() failed (Status 0x%08lx)\n", Status);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
Length = sizeof(SAM_DOMAIN_FIXED_DATA);
|
||||||
|
Status = SampGetObjectAttribute(DomainObject,
|
||||||
|
L"F",
|
||||||
|
NULL,
|
||||||
|
&FixedData,
|
||||||
|
&Length);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
TRACE("SampGetObjectAttribute() failed (Status 0x%08lx)\n", Status);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
PasswordInformation->MinPasswordLength = FixedData.MinPasswordLength;
|
||||||
|
PasswordInformation->PasswordProperties = FixedData.PasswordProperties;
|
||||||
|
|
||||||
|
done:
|
||||||
|
if (DomainObject != NULL)
|
||||||
|
SampCloseDbObject(DomainObject);
|
||||||
|
|
||||||
|
if (ServerHandle != NULL)
|
||||||
|
SamrCloseHandle(ServerHandle);
|
||||||
|
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue