s3-lsa: make s3 pass against RPC-LSA-LOOKUPNAMES again.
authorGünther Deschner <gd@samba.org>
Wed, 21 Oct 2009 00:45:21 +0000 (02:45 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 21 Oct 2009 00:57:08 +0000 (02:57 +0200)
Do what W2k8 does and return the builtin domain for a NULL name.

Guenther

source3/rpc_server/srv_lsa_nt.c

index eafbd51b5c0d2ad7818e8ce5bca22d9de9942ce1..23ea045b880476b1bc07476ab49b9e1db35b68d7 100644 (file)
@@ -159,12 +159,13 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx,
 
                /* Split name into domain and user component */
 
-               full_name = name[i].string;
-               if (full_name == NULL) {
-                       prid[i].sid_type        = type;
-                       prid[i].rid             = 0;
-                       prid[i].sid_index       = (uint32_t)-1;
-                       continue;
+               /* follow w2k8 behavior and return the builtin domain when no
+                * input has been passed in */
+
+               if (name[i].string) {
+                       full_name = name[i].string;
+               } else {
+                       full_name = "BUILTIN";
                }
 
                DEBUG(5, ("lookup_lsa_rids: looking up name %s\n", full_name));