svn commit: samba r17271 - in branches: SAMBA_3_0/source/passdb SAMBA_3_0_23/source/passdb

jerry at samba.org jerry at samba.org
Thu Jul 27 12:20:20 GMT 2006


Author: jerry
Date: 2006-07-27 12:20:19 +0000 (Thu, 27 Jul 2006)
New Revision: 17271

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17271

Log:
Fix a regression in the ldapsam uri syntax.
Allow multiple LDAP URIs to be grouped by  ""


Modified:
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   branches/SAMBA_3_0_23/source/passdb/pdb_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2006-07-27 11:24:18 UTC (rev 17270)
+++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2006-07-27 12:20:19 UTC (rev 17271)
@@ -5492,15 +5492,15 @@
 	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 ))) {
+	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;
 	}
 
-	/* the module itself stores a copy of the location so throw this one away */
-
-	if ( uri )
-		TALLOC_FREE( uri );
-
 	(*pdb_method)->name = "ldapsam_compat";
 
 	ldap_state = (struct ldapsam_privates *)((*pdb_method)->private_data);
@@ -5527,8 +5527,13 @@
 	DOM_SID secrets_domain_sid;
 	pstring domain_sid_string;
 	char *dn;
+	char *uri = talloc_strdup( NULL, location );
 
-	nt_status = pdb_init_ldapsam_common(pdb_method, location);
+	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;
 	}

Modified: branches/SAMBA_3_0_23/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0_23/source/passdb/pdb_ldap.c	2006-07-27 11:24:18 UTC (rev 17270)
+++ branches/SAMBA_3_0_23/source/passdb/pdb_ldap.c	2006-07-27 12:20:19 UTC (rev 17271)
@@ -5489,15 +5489,15 @@
 	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 ))) {
+	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;
 	}
 
-	/* the module itself stores a copy of the location so throw this one away */
-
-	if ( uri )
-		TALLOC_FREE( uri );
-
 	(*pdb_method)->name = "ldapsam_compat";
 
 	ldap_state = (*pdb_method)->private_data;
@@ -5524,8 +5524,13 @@
 	DOM_SID secrets_domain_sid;
 	pstring domain_sid_string;
 	char *dn;
+	char *uri = talloc_strdup( NULL, location );
 
-	nt_status = pdb_init_ldapsam_common(pdb_method, location);
+	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;
 	}



More information about the samba-cvs mailing list