1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

s3-samr: fix return code of _samr_LookupRids when run with pdb_ldap.

when _samr_LookupRids is called with no rids, it needs to return
NT_STATUS_NONE_MAPPED (not NT_STATUS_NO_MEMORY).

Found by RPC-SAMR torture test.

Guenther
This commit is contained in:
Günther Deschner 2009-06-07 02:02:26 +02:00
parent a783b1e4da
commit fbb1e990ab

View File

@ -3977,6 +3977,11 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
goto done; goto done;
} }
if (num_rids == 0) {
result = NT_STATUS_NONE_MAPPED;
goto done;
}
for (i=0; i<num_rids; i++) for (i=0; i<num_rids; i++)
attrs[i] = SID_NAME_UNKNOWN; attrs[i] = SID_NAME_UNKNOWN;