mirror of
https://github.com/samba-team/samba.git
synced 2025-11-19 04:23:48 +03:00
This changes the main selftest code to be in perl rather than in shell script. The selftest script is now no longer a black box but a regular executable that takes --help. This adds the following features: * "make test TESTS=foo" will run only the tests that match the regex "foo" * ability to deal with expected failures. the suite will not warn about tests that fail and are known to fail, but will warn about other failing tests and tests that are succeeding tests but incorrectly marked as failing. * ability to print a summary with all failures at the end of the run It also opens up the way to the following features, which I hope to implement later: * "environments", for example having a complete domains with DCs and domain members in a testenvironment * only set up smbd if necessary (not when running LOCAL tests, for example) * different mktestsetup scripts per target. except for the mktestsetup script, we can use the same infrastructure for samba 3 or windows.
72 lines
2.0 KiB
Bash
Executable File
72 lines
2.0 KiB
Bash
Executable File
FEDORA_DS_INF=$LDAPDIR/fedorads.inf
|
|
export FEDORA_DS_INF
|
|
FEDORA_DS_INITIAL_LDIF=$LDAPDIR/fedorads-initial.ldif
|
|
|
|
#Make the subdirectory be as fedora DS would expect
|
|
FEDORA_DS_DIR=$LDAPDIR/slapd-samba4
|
|
|
|
cat >$FEDORA_DS_INF <<EOF
|
|
[General]
|
|
SuiteSpotUserID = $ROOT
|
|
FullMachineName= localhost
|
|
ServerRoot= $LDAPDIR
|
|
|
|
[slapd]
|
|
ldapifilepath=$LDAPDIR/ldapi
|
|
Suffix= $BASEDN
|
|
RootDN= cn=Manager,$BASEDN
|
|
RootDNPwd= $PASSWORD
|
|
ServerIdentifier= samba4
|
|
InstallLdifFile=$FEDORA_DS_INITIAL_LDIF
|
|
|
|
inst_dir= $FEDORA_DS_DIR
|
|
config_dir= $FEDORA_DS_DIR
|
|
schema_dir= $FEDORA_DS_DIR/schema
|
|
lock_dir= $FEDORA_DS_DIR/lock
|
|
log_dir= $FEDORA_DS_DIR/logs
|
|
run_dir= $FEDORA_DS_DIR/logs
|
|
db_dir= $FEDORA_DS_DIR/db
|
|
bak_dir= $FEDORA_DS_DIR/bak
|
|
tmp_dir= $FEDORA_DS_DIR/tmp
|
|
ldif_dir= $FEDORA_DS_DIR/ldif
|
|
cert_dir= $FEDORA_DS_DIR
|
|
|
|
start_server= 0
|
|
|
|
EOF
|
|
|
|
cat >$FEDORA_DS_INITIAL_LDIF<<EOF
|
|
# These entries need to be added to get the container for the
|
|
# provision to be aimed at.
|
|
|
|
dn: cn="dc=$BASEDN",cn=mapping tree,cn=config
|
|
objectclass: top
|
|
objectclass: extensibleObject
|
|
objectclass: nsMappingTree
|
|
nsslapd-state: backend
|
|
nsslapd-backend: userData
|
|
cn: $BASEDN
|
|
|
|
dn: cn=userData,cn=ldbm database,cn=plugins,cn=config
|
|
objectclass: extensibleObject
|
|
objectclass: nsBackendInstance
|
|
nsslapd-suffix: $BASEDN
|
|
|
|
EOF
|
|
|
|
perl $FEDORA_DS_PREFIX/bin/ds_newinst.pl $FEDORA_DS_INF || exit 1;
|
|
|
|
(
|
|
cd $FEDORA_DS_DIR/schema
|
|
ls | grep -v ^00core | xargs rm
|
|
)
|
|
|
|
$srcdir/bin/ad2oLschema $CONFIGURATION -H $PRIVATEDIR/sam.ldb --option=convert:target=fedora-ds -I $srcdir/setup/schema-map-fedora-ds-1.0 -O $FEDORA_DS_DIR/schema/99_ad.ldif >&2
|
|
|
|
LDAP_URI_ESCAPE=$LDAP_URI;
|
|
PROVISION_OPTIONS="$PROVISION_OPTIONS --ldap-module=nsuniqueid"
|
|
#it is easier to base64 encode this than correctly escape it:
|
|
# (targetattr = "*") (version 3.0;acl "full access to all by all";allow (all)(userdn = "ldap:///anyone");)
|
|
PROVISION_ACI="--aci=aci:: KHRhcmdldGF0dHIgPSAiKiIpICh2ZXJzaW9uIDMuMDthY2wgImZ1bGwgYWNjZXNzIHRvIGFsbCBieSBhbGwiO2FsbG93IChhbGwpKHVzZXJkbiA9ICJsZGFwOi8vL2FueW9uZSIpOykK"
|
|
|