winbind: Don't crash on invalid idmap configs
authorVolker Lendecke <vl@samba.org>
Thu, 19 Nov 2015 16:00:49 +0000 (17:00 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 19 Nov 2015 19:16:44 +0000 (20:16 +0100)
We should not leave NULL in idmap_domains[]. This will lead to NULL
ptr deferences in idmap_find_domain().

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11612
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov 19 20:16:44 CET 2015 on sn-devel-104

source3/winbindd/idmap.c

index 8de8990d6e6f6bbe2f5878c56949caefd1f799a6..4012e70d9f0287b3470a57f9c58e7947cd8fdbef 100644 (file)
@@ -146,6 +146,7 @@ static bool idmap_found_domain_backend(
                if (dom == NULL) {
                        DBG_NOTICE("Could not init idmap domain %s\n",
                                   domname);
+                       return false;
                }
 
                tmp = talloc_realloc(idmap_domains, idmap_domains,