mirror of
https://github.com/reactos/reactos.git
synced 2025-05-20 17:45:06 +00:00
[SAMSRV] Fix SamrQueryInformationGroup
- Use the registry value AdminComment for admin comments instead of Description. Fix SamrSetInformationGroup as well. - Add some TRACEs. - Do not fail if the Members value does not exist.
This commit is contained in:
parent
c287bbe586
commit
0e69bc3bce
1 changed files with 17 additions and 3 deletions
|
@ -4164,7 +4164,7 @@ SampQueryGroupGeneral(PSAM_DB_OBJECT GroupObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = SampGetObjectAttributeString(GroupObject,
|
Status = SampGetObjectAttributeString(GroupObject,
|
||||||
L"Description",
|
L"AdminComment",
|
||||||
&InfoBuffer->General.AdminComment);
|
&InfoBuffer->General.AdminComment);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -4179,7 +4179,10 @@ SampQueryGroupGeneral(PSAM_DB_OBJECT GroupObject,
|
||||||
(PVOID)&FixedData,
|
(PVOID)&FixedData,
|
||||||
&Length);
|
&Length);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
TRACE("Status 0x%08lx\n", Status);
|
||||||
goto done;
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
InfoBuffer->General.Attributes = FixedData.Attributes;
|
InfoBuffer->General.Attributes = FixedData.Attributes;
|
||||||
|
|
||||||
|
@ -4189,12 +4192,20 @@ SampQueryGroupGeneral(PSAM_DB_OBJECT GroupObject,
|
||||||
NULL,
|
NULL,
|
||||||
&MembersLength);
|
&MembersLength);
|
||||||
if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_NAME_NOT_FOUND)
|
if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_NAME_NOT_FOUND)
|
||||||
|
{
|
||||||
|
TRACE("Status 0x%08lx\n", Status);
|
||||||
goto done;
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||||
|
{
|
||||||
InfoBuffer->General.MemberCount = 0;
|
InfoBuffer->General.MemberCount = 0;
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
InfoBuffer->General.MemberCount = MembersLength / sizeof(ULONG);
|
InfoBuffer->General.MemberCount = MembersLength / sizeof(ULONG);
|
||||||
|
}
|
||||||
|
|
||||||
*Buffer = InfoBuffer;
|
*Buffer = InfoBuffer;
|
||||||
|
|
||||||
|
@ -4279,7 +4290,10 @@ SampQueryGroupAttribute(PSAM_DB_OBJECT GroupObject,
|
||||||
(PVOID)&FixedData,
|
(PVOID)&FixedData,
|
||||||
&Length);
|
&Length);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
TRACE("Status 0x%08lx\n", Status);
|
||||||
goto done;
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
InfoBuffer->Attribute.Attributes = FixedData.Attributes;
|
InfoBuffer->Attribute.Attributes = FixedData.Attributes;
|
||||||
|
|
||||||
|
@ -4312,7 +4326,7 @@ SampQueryGroupAdminComment(PSAM_DB_OBJECT GroupObject,
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
Status = SampGetObjectAttributeString(GroupObject,
|
Status = SampGetObjectAttributeString(GroupObject,
|
||||||
L"Description",
|
L"AdminComment",
|
||||||
&InfoBuffer->AdminComment.AdminComment);
|
&InfoBuffer->AdminComment.AdminComment);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -4540,7 +4554,7 @@ SamrSetInformationGroup(IN SAMPR_HANDLE GroupHandle,
|
||||||
|
|
||||||
case GroupAdminCommentInformation:
|
case GroupAdminCommentInformation:
|
||||||
Status = SampSetObjectAttributeString(GroupObject,
|
Status = SampSetObjectAttributeString(GroupObject,
|
||||||
L"Description",
|
L"AdminComment",
|
||||||
&Buffer->AdminComment.AdminComment);
|
&Buffer->AdminComment.AdminComment);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue