From: Volker Lendecke Date: Sat, 7 Jan 2017 14:55:41 +0000 (+0000) Subject: winbind: Use idmap_config_const_string in idmap_script_db_init X-Git-Tag: tdb-1.3.13~428 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e78d78a1ff5b1d759b0fcfdc9dfd27461ec55706;p=thirdparty%2Fsamba.git winbind: Use idmap_config_const_string in idmap_script_db_init Signed-off-by: Volker Lendecke Reviewed-by: Michael Adam --- diff --git a/source3/winbindd/idmap_script.c b/source3/winbindd/idmap_script.c index 75eabdf1c00..4faf2d593b6 100644 --- a/source3/winbindd/idmap_script.c +++ b/source3/winbindd/idmap_script.c @@ -582,7 +582,6 @@ static NTSTATUS idmap_script_db_init(struct idmap_domain *dom) { NTSTATUS ret; struct idmap_script_context *ctx; - char *config_option = NULL; const char * idmap_script = NULL; DEBUG(10, ("%s called ...\n", __func__)); @@ -594,14 +593,7 @@ static NTSTATUS idmap_script_db_init(struct idmap_domain *dom) goto failed; } - config_option = talloc_asprintf(ctx, "idmap config %s", dom->name); - if (config_option == NULL) { - DEBUG(0, ("Out of memory!\n")); - ret = NT_STATUS_NO_MEMORY; - goto failed; - } - ctx->script = lp_parm_const_string(-1, config_option, "script", NULL); - talloc_free(config_option); + ctx->script = idmap_config_const_string(dom->name, "script", NULL); /* Do we even need to handle this? */ idmap_script = lp_parm_const_string(-1, "idmap", "script", NULL);