]> git.sur5r.net Git - openldap/commitdiff
ITS#4535 use randomly generated password for config database
authorHoward Chu <hyc@openldap.org>
Thu, 11 May 2006 03:10:45 +0000 (03:10 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 11 May 2006 03:10:45 +0000 (03:10 +0000)
tests/data/slapd-valsort.conf
tests/scripts/conf.sh
tests/scripts/defines.sh
tests/scripts/test042-valsort

index 166a30d92b74a0476209a86a6937bb3203ab0215..0d6b8c0dc068abad4fe8fd0eb25d0c43ef5c44ce 100644 (file)
@@ -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
index 7bef25a2a58305ba24b092cf063e056a5f98ebb6..c16ea0bb6800c483f0f0c31c155c45a07ab62496 100755 (executable)
@@ -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}/"      \
index 48b3eb6ca76a16bcb8a25eb34211f6dec6a2d169..f4da57e0e5876b0a37511fbccdfd92e29fb8b50f 100755 (executable)
@@ -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...
index ab02ad5ad45500aa472548e6ed4078586fb733e5..4b9108aad530665c92d180009ee9f5ce8d60a71b 100755 (executable)
@@ -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