summaryrefslogtreecommitdiff
path: root/selftest/target
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-02-24 20:41:50 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-02-24 20:49:59 +1100
commit022946d1961ddca40a9ac1fc00cf79ae32797669 (patch)
tree3312cb6ccb8a64be823b5d4ba5c7ac240800676f /selftest/target
parent997dfbbf5409a9df3b3c87025fa80fb6bdafcac2 (diff)
downloadsamba-022946d1961ddca40a9ac1fc00cf79ae32797669.tar.gz
samba-022946d1961ddca40a9ac1fc00cf79ae32797669.tar.bz2
samba-022946d1961ddca40a9ac1fc00cf79ae32797669.zip
Make the 'modules.conf' generation in the LDAP selftest simpler
The versions of OpenLDAP that we require don't need us to specify the location any more - slaptest knows this from it's build time. Andrew Bartlett
Diffstat (limited to 'selftest/target')
-rw-r--r--selftest/target/Samba4.pm59
1 files changed, 7 insertions, 52 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 09138cf0aa..71dddf6939 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -242,77 +242,32 @@ sub mk_openldap($$$)
$ENV{PATH} = "$olpath/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 "
-modulepath $olroot/libexec/openldap
-moduleload syncprov
-moduleload memberof
-moduleload refint
-";
- close(CONF);
- }
- if (system("slaptest -u -f $slapd_conf >&2") != 0) {
- open(CONF, ">$modconf");
- # enable slapd modules
- print CONF "
-modulepath $olroot/libexec/openldap
-moduleload back_hdb
-moduleload syncprov
-moduleload memberof
-moduleload refint
-";
- close(CONF);
- }
+ #This code tries to guess what modules we need to load (if any) by trying different combinations in the modules.conf
- if (system("slaptest -u -f $slapd_conf >&2") != 0) {
- open(CONF, ">$modconf");
- # enable slapd modules
- print CONF "
-moduleload back_hdb
-moduleload syncprov
-moduleload memberof
-moduleload refint
-";
- close(CONF);
- }
+ # Try without any slapd modules
+ open(CONF, ">$modconf"); 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_hdb
moduleload syncprov
moduleload memberof
moduleload refint
+moduleload deref
";
close(CONF);
}
-
if (system("slaptest -u -f $slapd_conf >&2") != 0) {
open(CONF, ">$modconf");
- # enable slapd modules (Fedora layout)
+ # enable slapd modules, and the module for back_hdb
print CONF "
-modulepath /usr/lib/openldap
-moduleload syncprov
-moduleload memberof
-moduleload refint
-";
- close(CONF);
- }
-
- if (system("slaptest -u -f $slapd_conf >&2") != 0) {
- open(CONF, ">$modconf");
- # enable slapd modules (Fedora x86_64 layout)
- print CONF "
-modulepath /usr/lib64/openldap
+moduleload back_hdb
moduleload syncprov
moduleload memberof
moduleload refint
+moduleload deref
";
close(CONF);
}