https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4bc5d44f0602b2fa0b7c2…
commit 4bc5d44f0602b2fa0b7c2bc1dde198a50426cea3
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Dec 29 17:28:55 2019 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Dec 29 17:29:43 2019 +0100
[SAMSRV] SamrEnumerate...: Return STATUS_NO_MORE_ENTRIES if there is nothing to
enumerate.
---
dll/win32/samsrv/samrpc.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/dll/win32/samsrv/samrpc.c b/dll/win32/samsrv/samrpc.c
index 0bea2e0d5f9..6b4aa622950 100644
--- a/dll/win32/samsrv/samrpc.c
+++ b/dll/win32/samsrv/samrpc.c
@@ -2290,7 +2290,10 @@ SamrEnumerateGroupsInDomain(IN SAMPR_HANDLE DomainHandle,
EnumBuffer->EntriesRead = EnumCount;
if (EnumCount == 0)
+ {
+ Status = STATUS_NO_MORE_ENTRIES;
goto done;
+ }
EnumBuffer->Buffer = midl_user_allocate(EnumCount *
sizeof(SAMPR_RID_ENUMERATION));
if (EnumBuffer->Buffer == NULL)
@@ -2900,7 +2903,10 @@ SamrEnumerateUsersInDomain(IN SAMPR_HANDLE DomainHandle,
EnumBuffer->EntriesRead = EnumCount;
if (EnumCount == 0)
+ {
+ Status = STATUS_NO_MORE_ENTRIES;
goto done;
+ }
EnumBuffer->Buffer = midl_user_allocate(EnumCount *
sizeof(SAMPR_RID_ENUMERATION));
if (EnumBuffer->Buffer == NULL)
@@ -3281,7 +3287,10 @@ SamrEnumerateAliasesInDomain(IN SAMPR_HANDLE DomainHandle,
EnumBuffer->EntriesRead = EnumCount;
if (EnumCount == 0)
+ {
+ Status = STATUS_NO_MORE_ENTRIES;
goto done;
+ }
EnumBuffer->Buffer = midl_user_allocate(EnumCount *
sizeof(SAMPR_RID_ENUMERATION));
if (EnumBuffer->Buffer == NULL)
@@ -6155,7 +6164,7 @@ SampQueryUserLogonHours(PSAM_DB_OBJECT UserObject,
}
Status = SampGetLogonHoursAttribute(UserObject,
- &InfoBuffer->LogonHours.LogonHours);
+ &InfoBuffer->LogonHours.LogonHours);
if (!NT_SUCCESS(Status))
{
TRACE("SampGetLogonHoursAttribute failed (Status 0x%08lx)\n", Status);
@@ -7057,7 +7066,7 @@ SampQueryUserAll(PSAM_DB_OBJECT UserObject,
if (InfoBuffer->All.WhichFields & USER_ALL_LOGONHOURS)
{
Status = SampGetLogonHoursAttribute(UserObject,
- &InfoBuffer->All.LogonHours);
+ &InfoBuffer->All.LogonHours);
if (!NT_SUCCESS(Status))
{
TRACE("Status 0x%08lx\n", Status);