]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
idmap: Use idmap_config_bool in idmap_init_domain
authorVolker Lendecke <vl@samba.org>
Sat, 18 Mar 2017 17:53:58 +0000 (18:53 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 20 Mar 2017 18:36:22 +0000 (19:36 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/winbindd/idmap.c

index be4ee6436545f0cea8fecbc46c30cebbfbdd9bf1..602d3cd1fc7240665c12acec8ff310132a462217 100644 (file)
@@ -361,7 +361,6 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx,
 {
        struct idmap_domain *result;
        NTSTATUS status;
-       char *config_option = NULL;
        const char *range;
        unsigned low_id = 0;
        unsigned high_id = 0;
@@ -405,18 +404,9 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx,
         * load ranges and read only information from the config
         */
 
-       config_option = talloc_asprintf(result, "idmap config %s",
-                                       result->name);
-       if (config_option == NULL) {
-               DEBUG(0, ("Out of memory!\n"));
-               goto fail;
-       }
-
-       result->read_only = lp_parm_bool(-1, config_option, "read only", false);
+       result->read_only = idmap_config_bool(result->name, "read only", false);
        range = idmap_config_const_string(result->name, "range", NULL);
 
-       talloc_free(config_option);
-
        if (range == NULL) {
                if (check_range) {
                        DEBUG(1, ("idmap range not specified for domain %s\n",