]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
idmap_ad: Use idmap_config_bool
authorVolker Lendecke <vl@samba.org>
Sat, 18 Mar 2017 17:59:06 +0000 (18:59 +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_ad.c

index f1dfeffda1981be17449127717b4455500c3cd17..1dbc3e467843dff247ab6f0ea773d5f302ac8d8e 100644 (file)
@@ -357,7 +357,6 @@ static NTSTATUS idmap_ad_context_create(TALLOC_CTX *mem_ctx,
                                        struct idmap_ad_context **pctx)
 {
        struct idmap_ad_context *ctx;
-       char *schema_config_option;
        const char *schema_mode;
        NTSTATUS status;
        TLDAPRC rc;
@@ -385,19 +384,10 @@ static NTSTATUS idmap_ad_context_create(TALLOC_CTX *mem_ctx,
                return status;
        }
 
-       schema_config_option = talloc_asprintf(
-               ctx, "idmap config %s", domname);
-       if (schema_config_option == NULL) {
-               TALLOC_FREE(ctx);
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       ctx->unix_primary_group = lp_parm_bool(
-               -1, schema_config_option, "unix_primary_group", false);
-       ctx->unix_nss_info = lp_parm_bool(
-               -1, schema_config_option, "unix_nss_info", false);
-
-       TALLOC_FREE(schema_config_option);
+       ctx->unix_primary_group = idmap_config_bool(
+               domname, "unix_primary_group", false);
+       ctx->unix_nss_info = idmap_config_bool(
+               domname, "unix_nss_info", false);
 
        schema_mode = idmap_config_const_string(
                domname, "schema_mode", "rfc2307");