From: Howard Chu Date: Thu, 11 May 2006 03:10:45 +0000 (+0000) Subject: ITS#4535 use randomly generated password for config database X-Git-Tag: OPENLDAP_REL_ENG_2_4_1ALPHA~2^2~50 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d07951762a63fd34cc4d9180ef225d61e4ba5d2f;p=openldap ITS#4535 use randomly generated password for config database --- diff --git a/tests/data/slapd-valsort.conf b/tests/data/slapd-valsort.conf index 166a30d92b..0d6b8c0dc0 100644 --- a/tests/data/slapd-valsort.conf +++ b/tests/data/slapd-valsort.conf @@ -52,6 +52,6 @@ valsort-attr ou ou=users,o=valsort weighted valsort-attr employeeType ou=users,o=valsort weighted alpha-ascend database config -rootpw secret +rootpw @CONFIGPW@ #monitor#database monitor diff --git a/tests/scripts/conf.sh b/tests/scripts/conf.sh index 7bef25a2a5..c16ea0bb68 100755 --- a/tests/scripts/conf.sh +++ b/tests/scripts/conf.sh @@ -69,6 +69,7 @@ sed -e "s/@BACKEND@/${BACKEND}/" \ -e "s;@PORT4@;${PORT4};" \ -e "s;@PORT5@;${PORT5};" \ -e "s;@PORT6@;${PORT6};" \ + -e "s/@CONFIGPW@/${CONFIGPW}/" \ -e "s/@SASL_MECH@/${SASL_MECH}/" \ -e "s/@CACHETTL@/${CACHETTL}/" \ -e "s/@ENTRY_LIMIT@/${CACHE_ENTRY_LIMIT}/" \ diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 48b3eb6ca7..f4da57e0e5 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -134,6 +134,9 @@ CONFFILTER=$SRCDIR/scripts/conf.sh SLAPADD="../servers/slapd/slapd -Ta -d 0 $LDAP_VERBOSE" SLAPCAT="../servers/slapd/slapd -Tc -d 0 $LDAP_VERBOSE" SLAPINDEX="../servers/slapd/slapd -Ti -d 0 $LDAP_VERBOSE" +SLAPPASSWD="../servers/slapd/slapd -Tpasswd" + +CONFIGPWF=$TESTDIR/configpw unset DIFF_OPTIONS # NOTE: -u/-c is not that portable... diff --git a/tests/scripts/test042-valsort b/tests/scripts/test042-valsort index ab02ad5ad4..4b9108aad5 100755 --- a/tests/scripts/test042-valsort +++ b/tests/scripts/test042-valsort @@ -23,6 +23,14 @@ fi mkdir -p $TESTDIR $DBDIR1 +$SLAPPASSWD -g > $CONFIGPWF +RC=$? +if test $RC != 0 ; then + echo "slappasswd failed ($RC)!" + exit $RC +fi +read CONFIGPW < $CONFIGPWF + echo "Running slapadd to build slapd database..." . $CONFFILTER $BACKEND $MONITORDB < $VALSORTCONF > $CONF1 $SLAPADD -f $CONF1 -l $LDIFVALSORT @@ -87,7 +95,7 @@ fi echo "Reconfiguring slapd to test valsort descending" -$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -w $PASSWD > \ +$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \ $TESTOUT 2>&1 << EOMODS version: 1 dn: olcOverlay={0}valsort,olcDatabase={1}$BACKEND,cn=config