diff options
author | Simo Sorce <idra@samba.org> | 2007-09-10 16:21:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:37 -0500 |
commit | 3f8e1f9ad21f90744005966bb6a3eb8b754231d9 (patch) | |
tree | 5792dff64017a83d0eaed19327e80a027db3557f | |
parent | df04cb69f78637864b5b171c5797d3247339472e (diff) | |
download | samba-3f8e1f9ad21f90744005966bb6a3eb8b754231d9.tar.gz samba-3f8e1f9ad21f90744005966bb6a3eb8b754231d9.tar.bz2 samba-3f8e1f9ad21f90744005966bb6a3eb8b754231d9.zip |
r25059: Apply to 3.2 as well
(This used to be commit 17a7d33b3bede85d6d64ecadfa065e71739517be)
-rw-r--r-- | source3/nsswitch/idmap_ldap.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/source3/nsswitch/idmap_ldap.c b/source3/nsswitch/idmap_ldap.c index 1701b68330..b2aaf699d5 100644 --- a/source3/nsswitch/idmap_ldap.c +++ b/source3/nsswitch/idmap_ldap.c @@ -287,16 +287,9 @@ static NTSTATUS idmap_ldap_alloc_init(const char *params) } CHECK_ALLOC_DONE( idmap_alloc_ldap->url ); - tmp = lp_ldap_idmap_suffix(); + tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL); if ( ! tmp || ! *tmp) { - tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL); - } - if ( ! tmp) { - tmp = lp_ldap_suffix(); - if (tmp) { - DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp)); - DEBUGADD(1, ("as suffix. This may not be what you want!\n")); - } + tmp = lp_ldap_idmap_suffix(); if ( ! tmp) { DEBUG(1, ("ERROR: missing idmap ldap suffix\n")); ret = NT_STATUS_UNSUCCESSFUL; @@ -781,21 +774,16 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom) } CHECK_ALLOC_DONE(ctx->url); - tmp = lp_ldap_idmap_suffix(); - if ( ! tmp || ! *tmp) { - tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL); - } - if ( ! tmp) { - tmp = lp_ldap_suffix(); - if (tmp) { - DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp)); - DEBUGADD(1, ("as suffix. This may not be what you want!\n")); - } else { - DEBUG(1, ("ERROR: missing idmap ldap suffix\n")); - ret = NT_STATUS_UNSUCCESSFUL; - goto done; - } - } + tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL); + if ( ! tmp || ! *tmp) { + tmp = lp_ldap_idmap_suffix(); + if ( ! tmp) { + DEBUG(1, ("ERROR: missing idmap ldap suffix\n")); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + } + ctx->suffix = talloc_strdup(ctx, tmp); CHECK_ALLOC_DONE(ctx->suffix); |