r25450: Make it easier to test with a particular version of OpenLDAP, by
authorAndrew Bartlett <abartlet@samba.org>
Mon, 1 Oct 2007 21:07:07 +0000 (21:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:07:37 +0000 (15:07 -0500)
setting OPENLDAP_PATH, move to using hdb as the backend (allows
subtree renames), and re-enable the --quiet option.

Andrew Bartlett

source/selftest/env/Samba4.pm
source/setup/slapd.conf

index 0cd9c2e2bec746221bde3379c888ac48944ceb9d..b074252c59cf6cc393e0918affef122e1b45622e 100644 (file)
@@ -216,17 +216,27 @@ sub mk_openldap($$$)
        system("$self->{bindir}/ad2oLschema $configuration --option=convert:target=openldap -H $ldapdir/schema-tmp.ldb -I $self->{setupdir}/schema-map-openldap-2.3 -O $ldapdir/backend-schema.schema >&2") == 0 or die("schema conversion for OpenLDAP failed");
 
        my $oldpath = $ENV{PATH};
-       $ENV{PATH} = "/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
+       $ENV{PATH} = "$ENV{OPENLDAP_PATH}/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}";
 
        unlink($modconf);
        open(CONF, ">$modconf"); close(CONF);
 
+       if (system("slaptest -u -f $slapd_conf >&2") != 0) {
+               open(CONF, ">$modconf"); 
+               # enable slapd modules
+               print CONF "
+moduleload     back_hdb
+moduleload     syncprov
+";
+               close(CONF);
+       }
+
        if (system("slaptest -u -f $slapd_conf >&2") != 0) {
                open(CONF, ">$modconf"); 
                # enable slapd modules
                print CONF "
 modulepath     /usr/lib/ldap
-moduleload     back_bdb
+moduleload     back_hdb
 moduleload     syncprov
 ";
                close(CONF);
@@ -412,7 +422,7 @@ my @provision_options = ("$self->{bindir}/smbscript", "$self->{setupdir}/provisi
        push (@provision_options, split(' ', $configuration));
        push (@provision_options, "--host-name=$netbiosname");
        push (@provision_options, "--host-ip=$ifaceipv4");
-#      push (@provision_options, "--quiet");
+       push (@provision_options, "--quiet");
        push (@provision_options, "--domain=$domain");
        push (@provision_options, "--realm=$realm");
        push (@provision_options, "--adminpass=$password");
index 34896d04b93b56bc3d772c0d8ec81f0d877c8a40..15e3610e3ae7690e5292ec5e0455edc4e67499c7 100644 (file)
@@ -21,7 +21,7 @@ include ${LDAPDIR}/modules.conf
 
 defaultsearchbase ${DOMAINDN}
 
-backend                bdb
+backend                hdb
 database        bdb
 suffix         ${SCHEMADN}
 directory      ${LDAPDIR}/db/schema
@@ -32,7 +32,7 @@ index objectCategory eq
 index lDAPDisplayName eq
 index subClassOf eq
 
-database        bdb
+database        hdb
 suffix         ${CONFIGDN}
 directory      ${LDAPDIR}/db/config
 index           objectClass eq
@@ -45,7 +45,7 @@ index subClassOf eq
 index dnsRoot eq
 index nETBIOSName eq pres
 
-database        bdb
+database        hdb
 suffix         ${DOMAINDN}
 rootdn          ${LDAPMANAGERDN}
 rootpw          ${LDAPMANAGERPASS}