summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/winbindd/idmap_ldap.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index aaac75f101..eb3e67de82 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -461,21 +461,15 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom,
}
}
- if (params != NULL) {
- /* assume location is the only parameter */
- ctx->url = talloc_strdup(ctx, params);
- } else {
- tmp = lp_parm_const_string(-1, config_option, "ldap_url", NULL);
+ tmp = lp_parm_const_string(-1, config_option, "ldap_url", NULL);
- if ( ! tmp) {
- DEBUG(1, ("ERROR: missing idmap ldap url\n"));
- ret = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- ctx->url = talloc_strdup(ctx, tmp);
+ if ( ! tmp) {
+ DEBUG(1, ("ERROR: missing idmap ldap url\n"));
+ ret = NT_STATUS_UNSUCCESSFUL;
+ goto done;
}
- CHECK_ALLOC_DONE(ctx->url);
+
+ ctx->url = talloc_strdup(ctx, tmp);
trim_char(ctx->url, '\"', '\"');