s3-lsa: allow to have NULL strings in lsa LookupName queries.
authorGünther Deschner <gd@samba.org>
Tue, 20 Oct 2009 13:11:58 +0000 (15:11 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 20 Oct 2009 13:28:30 +0000 (15:28 +0200)
Found by RPC-LSA-LOOKUPNAMES torture test.

Guenther

source3/rpc_server/srv_lsa_nt.c

index cc5d23ce71fc3e3f3682ed3b0040637ce1f83fae..c5805ef3d4b78222fde0d1f7346023ba1d922e80 100644 (file)
@@ -161,7 +161,10 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx,
 
                full_name = name[i].string;
                if (full_name == NULL) {
-                       return NT_STATUS_NO_MEMORY;
+                       prid[i].sid_type        = type;
+                       prid[i].rid             = 0;
+                       prid[i].sid_index       = (uint32_t)-1;
+                       continue;
                }
 
                DEBUG(5, ("lookup_lsa_rids: looking up name %s\n", full_name));