From: Jeremy Allison Date: Fri, 5 Nov 2010 19:11:53 +0000 (-0700) Subject: First part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32a5aa62cb54e90947bd027e72871ffc07c3dbcf;p=thirdparty%2Fsamba.git First part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd allocates new uids/gids in error. Ensure idmap_init_passdb_domain() correctly initialized the default domain first. Jeremy. --- diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c index 4aa229cd662..7aa2853df10 100644 --- a/source3/winbindd/idmap.c +++ b/source3/winbindd/idmap.c @@ -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; }