mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 17:38:30 +00:00
[SAMSRV]
SamrQueryInformationAlias: When retrieving general information, return a member count of zero if the members sub key does not exist. svn path=/trunk/; revision=57682
This commit is contained in:
parent
26504938df
commit
0b38742a0c
1 changed files with 20 additions and 9 deletions
|
@ -155,6 +155,7 @@ SamrShutdownSamServer(IN SAMPR_HANDLE ServerHandle)
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Function 5 */
|
/* Function 5 */
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
@ -264,6 +265,7 @@ SamrLookupDomainInSamServer(IN SAMPR_HANDLE ServerHandle,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Function 6 */
|
/* Function 6 */
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
@ -3825,6 +3827,8 @@ SamrOpenAlias(IN SAMPR_HANDLE DomainHandle,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AliasObject->Special.Alias.RelativeId = AliasId;
|
||||||
|
|
||||||
*AliasHandle = (SAMPR_HANDLE)AliasObject;
|
*AliasHandle = (SAMPR_HANDLE)AliasObject;
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -3868,17 +3872,24 @@ SampQueryAliasGeneral(PSAM_DB_OBJECT AliasObject,
|
||||||
L"Members",
|
L"Members",
|
||||||
KEY_READ,
|
KEY_READ,
|
||||||
&MembersKeyHandle);
|
&MembersKeyHandle);
|
||||||
if (!NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
TRACE("Status 0x%08lx\n", Status);
|
/* Retrieve the number of members of the alias */
|
||||||
goto done;
|
Status = SampRegQueryKeyInfo(MembersKeyHandle,
|
||||||
|
NULL,
|
||||||
|
&InfoBuffer->General.MemberCount);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
TRACE("Status 0x%08lx\n", Status);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||||
/* Retrieve the number of members of the alias */
|
{
|
||||||
Status = SampRegQueryKeyInfo(MembersKeyHandle,
|
InfoBuffer->General.MemberCount = 0;
|
||||||
NULL,
|
Status = STATUS_SUCCESS;
|
||||||
&InfoBuffer->General.MemberCount);
|
}
|
||||||
if (!NT_SUCCESS(Status))
|
else
|
||||||
{
|
{
|
||||||
TRACE("Status 0x%08lx\n", Status);
|
TRACE("Status 0x%08lx\n", Status);
|
||||||
goto done;
|
goto done;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue