s3:idmap: make sure that the id mapping system is initialized for first access
authorMichael Adam <obnox@samba.org>
Thu, 10 Mar 2011 22:41:17 +0000 (23:41 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 22 Mar 2011 21:49:58 +0000 (22:49 +0100)
source3/winbindd/idmap.c

index 0fd987cf0b468c65728f8c83a7e6a452e602a20d..49d7c3aa6122f2911ef099419c4f77226e6ef806 100644 (file)
@@ -273,6 +273,8 @@ static struct idmap_domain *idmap_init_named_domain(TALLOC_CTX *mem_ctx,
        char *config_option;
        const char *backend;
 
+       idmap_init();
+
        config_option = talloc_asprintf(talloc_tos(), "idmap config %s",
                                        domname);
        if (config_option == NULL) {
@@ -372,6 +374,8 @@ static struct idmap_domain *idmap_find_domain(const char *domname)
        DEBUG(10, ("idmap_find_domain called for domain '%s'\n",
                   domname?domname:"NULL"));
 
+       idmap_init();
+
        /*
         * Always init the default domain, we can't go without one
         */