From fbb1e990ab3915956217c2747a983e9ae0469fd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Sun, 7 Jun 2009 02:02:26 +0200 Subject: [PATCH] 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 --- source3/passdb/pdb_ldap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 0bebcc7c2ca..2272aedf134 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -3977,6 +3977,11 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods, goto done; } + if (num_rids == 0) { + result = NT_STATUS_NONE_MAPPED; + goto done; + } + for (i=0; i