From 03d0b9fe01f5ca096173aa4efa4ccda6b3fd31b9 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Aug 21 2007 13:48:59 +0000 Subject: Forgot to add the patch file to cvs --- diff --git a/samba-3.0.25-imdap-basedn.patch b/samba-3.0.25-imdap-basedn.patch new file mode 100644 index 0000000..6765728 --- /dev/null +++ b/samba-3.0.25-imdap-basedn.patch @@ -0,0 +1,55 @@ +diff --git a/source/nsswitch/idmap_ldap.c b/source/nsswitch/idmap_ldap.c +index ca7d32b..7c02779 100644 +--- a/source/nsswitch/idmap_ldap.c ++++ b/source/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; +@@ -780,21 +773,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); +