summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-07-27 12:20:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:23 -0500
commit9bfa22a502df998c0a813d33907347fc5d0dc827 (patch)
tree4ebd7fa1c753802b315b4be30871aacb0d436180 /source3
parent8f93665bb5db57e3725487373e68a476a8e31d6d (diff)
downloadsamba-9bfa22a502df998c0a813d33907347fc5d0dc827.tar.gz
samba-9bfa22a502df998c0a813d33907347fc5d0dc827.tar.bz2
samba-9bfa22a502df998c0a813d33907347fc5d0dc827.zip
r17271: Fix a regression in the ldapsam uri syntax.
Allow multiple LDAP URIs to be grouped by "" (This used to be commit 21d69dcb3c5361f94d15b2d186e1aae6e246a24e)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_ldap.c19
1 files changed, 12 insertions, 7 deletions
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;
}