From 9bfa22a502df998c0a813d33907347fc5d0dc827 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 27 Jul 2006 12:20:19 +0000 Subject: r17271: Fix a regression in the ldapsam uri syntax. Allow multiple LDAP URIs to be grouped by "" (This used to be commit 21d69dcb3c5361f94d15b2d186e1aae6e246a24e) --- source3/passdb/pdb_ldap.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 7dc76dafe7..afc95fe90f 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -5492,15 +5492,15 @@ NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *lo struct ldapsam_privates *ldap_state; char *uri = talloc_strdup( NULL, location ); - if (!NT_STATUS_IS_OK(nt_status = pdb_init_ldapsam_common( pdb_method, uri ))) { - return nt_status; - } - - /* the module itself stores a copy of the location so throw this one away */ - + trim_char( uri, '\"', '\"' ); + nt_status = pdb_init_ldapsam_common( pdb_method, uri ); if ( uri ) TALLOC_FREE( uri ); + if ( !NT_STATUS_IS_OK(nt_status) ) { + return nt_status; + } + (*pdb_method)->name = "ldapsam_compat"; ldap_state = (struct ldapsam_privates *)((*pdb_method)->private_data); @@ -5527,8 +5527,13 @@ NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location) DOM_SID secrets_domain_sid; pstring domain_sid_string; char *dn; + char *uri = talloc_strdup( NULL, location ); + + trim_char( uri, '\"', '\"' ); + nt_status = pdb_init_ldapsam_common(pdb_method, uri); + if ( uri ) + TALLOC_FREE( uri ); - nt_status = pdb_init_ldapsam_common(pdb_method, location); if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; } -- cgit