]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
First part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd...
authorJeremy Allison <jra@samba.org>
Fri, 5 Nov 2010 19:11:53 +0000 (12:11 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 16 Nov 2010 14:48:17 +0000 (15:48 +0100)
Ensure idmap_init_passdb_domain() correctly initialized the default
domain first.

Jeremy.

source3/winbindd/idmap.c

index 4aa229cd6623ed34ff74f3aadc88bd5f4442e4de..7aa2853df10c4e556152ea18689b74a7727d81d4 100644 (file)
@@ -428,6 +428,16 @@ fail:
 
 static struct idmap_domain *idmap_init_passdb_domain(TALLOC_CTX *mem_ctx)
 {
+       /*
+        * Always init the default domain, we can't go without one
+        */
+       if (default_idmap_domain == NULL) {
+               default_idmap_domain = idmap_init_default_domain(NULL);
+       }
+       if (default_idmap_domain == NULL) {
+               return NULL;
+       }
+
        if (passdb_idmap_domain != NULL) {
                return passdb_idmap_domain;
        }