Author: ekohl
Date: Tue Nov 6 23:39:59 2012
New Revision: 57682
URL:
http://svn.reactos.org/svn/reactos?rev=57682&view=rev
Log:
[SAMSRV]
SamrQueryInformationAlias: When retrieving general information, return a member count of
zero if the members sub key does not exist.
Modified:
trunk/reactos/dll/win32/samsrv/samrpc.c
Modified: trunk/reactos/dll/win32/samsrv/samrpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Tue Nov 6 23:39:59 2012
@@ -154,6 +154,7 @@
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
+
/* Function 5 */
NTSTATUS
@@ -263,6 +264,7 @@
return Status;
}
+
/* Function 6 */
NTSTATUS
@@ -3825,6 +3827,8 @@
return Status;
}
+ AliasObject->Special.Alias.RelativeId = AliasId;
+
*AliasHandle = (SAMPR_HANDLE)AliasObject;
return STATUS_SUCCESS;
@@ -3868,17 +3872,24 @@
L"Members",
KEY_READ,
&MembersKeyHandle);
- if (!NT_SUCCESS(Status))
- {
- TRACE("Status 0x%08lx\n", Status);
- goto done;
- }
-
- /* Retrieve the number of members of the alias */
- Status = SampRegQueryKeyInfo(MembersKeyHandle,
- NULL,
- &InfoBuffer->General.MemberCount);
- if (!NT_SUCCESS(Status))
+ if (NT_SUCCESS(Status))
+ {
+ /* Retrieve the number of members of the alias */
+ 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)
+ {
+ InfoBuffer->General.MemberCount = 0;
+ Status = STATUS_SUCCESS;
+ }
+ else
{
TRACE("Status 0x%08lx\n", Status);
goto done;