r3757: Some fixes for ldb_ldap
authorSimo Sorce <idra@samba.org>
Mon, 15 Nov 2004 12:30:28 +0000 (12:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:51 +0000 (13:05 -0500)
Now we pass also the test-ldap tests :-)

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

index a7cfd81d46b28666b1e5c225771c604fe02fd9dc..37be07c1ca79cbc422f06b2450860f3bf2d8cdcc 100644 (file)
@@ -80,7 +80,7 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
                }
        }
 
-       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;
index 96aee088a70b8f62e072728963a9d38ee0f3523c..7fb6a0b3f7bb7cc748ec8b8d204ede42fe04aed3 100644 (file)
@@ -255,6 +255,10 @@ static int lldb_search(struct ldb_module *module, const char *base,
        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), 
index 65700f6c1839532df7b22bbe45a278934e843da5..fc1ed16a4cc7592a5a572bda0996ff02b165c119 100755 (executable)
@@ -1,6 +1,4 @@
-#!/bin/sh
-
-export PATH=/usr/sbin:$PATH
+#!/bin/sh 
 
 rm -rf tests/tmp/db
 mkdir -p tests/tmp/db
index 10d15b541ce3d9a312eccdc61e24581bc97f4f17..61c8627e18f3ef1e5106f56ea1105992f7218d11 100644 (file)
@@ -14,8 +14,8 @@ access to * by * write
 
 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"
 
index d03a0fca3238bf6dad8c2ff8b29f05508e536e61..a7ec69c85531f6272fdaa2b9d1cc0178cfeaad9f 100755 (executable)
@@ -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`" $*
index b70b81773235a94453adb2725a0da18b68930c34..c4647a7ba334e543ab9f29f0dccde97ca85be4c7 100755 (executable)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 echo "LDB_URL: $LDB_URL"
 
 echo "Adding base elements"
index 37827219c01d91d4f3f7661afa0a6f6300b21ab3..4fcd328cad7e8234b55eb5a4d249214c23afe279 100755 (executable)
@@ -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