mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
idmap_rfc2307: Use idmap_config_bool
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
cdaec3be3a
commit
3e72603c1f
@ -763,7 +763,6 @@ static int idmap_rfc2307_context_destructor(struct idmap_rfc2307_context *ctx)
|
||||
static NTSTATUS idmap_rfc2307_initialize(struct idmap_domain *domain)
|
||||
{
|
||||
struct idmap_rfc2307_context *ctx;
|
||||
char *cfg_opt;
|
||||
const char *bind_path_user, *bind_path_group, *ldap_server, *realm;
|
||||
NTSTATUS status;
|
||||
|
||||
@ -773,12 +772,6 @@ static NTSTATUS idmap_rfc2307_initialize(struct idmap_domain *domain)
|
||||
}
|
||||
talloc_set_destructor(ctx, idmap_rfc2307_context_destructor);
|
||||
|
||||
cfg_opt = talloc_asprintf(ctx, "idmap config %s", domain->name);
|
||||
if (cfg_opt == NULL) {
|
||||
status = NT_STATUS_NO_MEMORY;
|
||||
goto err;
|
||||
}
|
||||
|
||||
bind_path_user = idmap_config_const_string(
|
||||
domain->name, "bind_path_user", NULL);
|
||||
if (bind_path_user) {
|
||||
@ -835,14 +828,12 @@ static NTSTATUS idmap_rfc2307_initialize(struct idmap_domain *domain)
|
||||
}
|
||||
}
|
||||
|
||||
ctx->user_cn = lp_parm_bool(-1, cfg_opt, "user_cn", false);
|
||||
ctx->user_cn = idmap_config_bool(domain->name, "user_cn", false);
|
||||
|
||||
domain->private_data = ctx;
|
||||
talloc_free(cfg_opt);
|
||||
return NT_STATUS_OK;
|
||||
|
||||
err:
|
||||
talloc_free(cfg_opt);
|
||||
talloc_free(ctx);
|
||||
return status;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user