svn commit: samba r3757 - in branches/SAMBA_4_0/source/lib/ldb: common ldb_ldap tests

idra at samba.org idra at samba.org
Mon Nov 15 12:30:28 GMT 2004


Author: idra
Date: 2004-11-15 12:30:28 +0000 (Mon, 15 Nov 2004)
New Revision: 3757

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

Log:

Some fixes for ldb_ldap
Now we pass also the test-ldap tests :-)


Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
   branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh
   branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf
   branches/SAMBA_4_0/source/lib/ldb/tests/start_slapd.sh
   branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
   branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c	2004-11-15 12:24:02 UTC (rev 3756)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c	2004-11-15 12:30:28 UTC (rev 3757)
@@ -80,7 +80,7 @@
 		}
 	}
 
-	if (!modules) { /* no modules in the options, look for @MODULES in the db */
+	if (!modules && strcmp("ldap", ldb->modules->ops->name)) { /* no modules in the options, look for @MODULES in the db (not for ldap) */
 		int ret, j, k;
 		char * attrs[] = { "@MODULE" };
 		struct ldb_message **msg;

Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c	2004-11-15 12:24:02 UTC (rev 3756)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c	2004-11-15 12:30:28 UTC (rev 3757)
@@ -255,6 +255,10 @@
 	int count, msg_count;
 	LDAPMessage *ldapres, *msg;
 
+	if (base == NULL) {
+		base = "";
+	}
+
 	lldb->last_rc = ldap_search_s(lldb->ldap, base, (int)scope, 
 				      expression, 
 				      discard_const_p(char *, attrs), 

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh	2004-11-15 12:24:02 UTC (rev 3756)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh	2004-11-15 12:30:28 UTC (rev 3757)
@@ -1,7 +1,5 @@
-#!/bin/sh
+#!/bin/sh 
 
-export PATH=/usr/sbin:$PATH
-
 rm -rf tests/tmp/db
 mkdir -p tests/tmp/db
 

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf	2004-11-15 12:24:02 UTC (rev 3756)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf	2004-11-15 12:30:28 UTC (rev 3757)
@@ -14,8 +14,8 @@
 
 allow update_anon bind_anon_dn
 
-modulepath	/usr/lib/ldap
-moduleload	back_bdb
+#modulepath	/usr/lib/ldap
+#moduleload	back_bdb
 
 defaultsearchbase "o=University of Michigan,c=US"
 

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/start_slapd.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/start_slapd.sh	2004-11-15 12:24:02 UTC (rev 3756)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/start_slapd.sh	2004-11-15 12:30:28 UTC (rev 3757)
@@ -1,7 +1,5 @@
 #!/bin/sh
 
-export PATH=/usr/sbin:$PATH
-
 mkdir -p tests/tmp/db
 
 slapd -f tests/slapd.conf -h "`tests/ldapi_url.sh`" $*

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh	2004-11-15 12:24:02 UTC (rev 3756)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh	2004-11-15 12:30:28 UTC (rev 3757)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 echo "LDB_URL: $LDB_URL"
 
 echo "Adding base elements"

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh	2004-11-15 12:24:02 UTC (rev 3756)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh	2004-11-15 12:30:28 UTC (rev 3757)
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
 SCHEMA_NEEDED="core nis cosine inetorgperson openldap"
 
 # setup needed schema files



More information about the samba-cvs mailing list