From 3770a991787e93688a4119fd5e803c85d2a80845 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 21 Jan 2002 06:35:04 +0000 Subject: [PATCH] set hostname via a variable, may need tweaking in some environments --- tests/scripts/defines.sh | 6 +++--- tests/scripts/passwd-search | 12 ++++++------ tests/scripts/start-master | 2 +- tests/scripts/start-master-nolog | 2 +- tests/scripts/test000-rootdse | 2 +- tests/scripts/test001-slapadd | 2 +- tests/scripts/test002-populate | 6 +++--- tests/scripts/test003-search | 10 +++++----- tests/scripts/test004-modify | 6 +++--- tests/scripts/test005-modrdn | 18 +++++++++--------- tests/scripts/test006-acls | 16 ++++++++-------- tests/scripts/test007-replication | 12 ++++++------ tests/scripts/test008-concurrency | 6 +++--- tests/scripts/test009-referral | 12 ++++++------ tests/scripts/test010-passwd | 22 +++++++++++----------- tests/scripts/test011-subtree-repl | 14 +++++++------- tests/scripts/test012-glue | 8 ++++---- 17 files changed, 78 insertions(+), 78 deletions(-) diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 96a7c13d4f..925d621a7b 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -52,11 +52,11 @@ LDAPADD="$CLIENTDIR/ldapadd $TOOLPROTO $TOOLARGS" LDAPMODRDN="$CLIENTDIR/ldapmodrdn $TOOLPROTO $TOOLARGS" SLAPDTESTER=$PROGDIR/slapd-tester LVL=${SLAPD_DEBUG-5} -ADDR=127.0.0.1 +LOCALHOST=localhost PORT=9009 SLAVEPORT=9010 -MASTERURI="ldap://localhost:$PORT/" -SLAVEURI="ldap://localhost:$SLAVEPORT/" +MASTERURI="ldap://${LOCALHOST}:$PORT/" +SLAVEURI="ldap://${LOCALHOST}:$SLAVEPORT/" LDIF=$DATADIR/test.ldif LDIFGLUED=$DATADIR/test-glued.ldif LDIFORDERED=$DATADIR/test-ordered.ldif diff --git a/tests/scripts/passwd-search b/tests/scripts/passwd-search index 22b940f090..ba6fedb80e 100755 --- a/tests/scripts/passwd-search +++ b/tests/scripts/passwd-search @@ -23,7 +23,7 @@ PID=$! echo "Testing slapd searching..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -L -b "$BASEDN" -h localhost -p $PORT \ + $LDAPSEARCH -L -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -41,7 +41,7 @@ fi cat /dev/null > $TESTOUT echo "Testing base suffix searching..." -$LDAPSEARCH -L -S "" -b "$BASEDN" -s base -h localhost -p $PORT \ +$LDAPSEARCH -L -S "" -b "$BASEDN" -s base -h $LOCALHOST -p $PORT \ '(objectclass=*)' >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed!" @@ -52,7 +52,7 @@ fi echo " ------------ " >> $TESTOUT echo "Testing user searching..." -$LDAPSEARCH -L -S "" -b "uid=root,$BASEDN" -s base -h localhost -p $PORT \ +$LDAPSEARCH -L -S "" -b "uid=root,$BASEDN" -s base -h $LOCALHOST -p $PORT \ '(objectclass=*)' >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed!" @@ -63,7 +63,7 @@ fi echo " ------------ " >> $TESTOUT echo "Testing exact searching..." -$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -L -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ '(uid=root)' >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed!" @@ -74,7 +74,7 @@ fi echo " ------------ " >> $TESTOUT echo "Testing OR searching..." -$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -L -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ '(|(objectclass=person)(cn=root))' >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed!" @@ -85,7 +85,7 @@ fi echo " ------------ " >> $TESTOUT echo "Testing AND searching..." -$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -L -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ '(&(objectclass=person)(cn=root))' >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed!" diff --git a/tests/scripts/start-master b/tests/scripts/start-master index f527c432b8..bbad878074 100755 --- a/tests/scripts/start-master +++ b/tests/scripts/start-master @@ -35,7 +35,7 @@ PID=$! echo "Using ldapsearch to retrieve all the entries..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -S "" -b "$BASEDN" -h localhost:$PORT > $SEARCHOUT 2>&1 + $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT > $SEARCHOUT 2>&1 RC=$? if test $RC = 1 ; then echo "Waiting 5 seconds for slapd to start..." diff --git a/tests/scripts/start-master-nolog b/tests/scripts/start-master-nolog index 6055321607..0dedcb752a 100755 --- a/tests/scripts/start-master-nolog +++ b/tests/scripts/start-master-nolog @@ -35,7 +35,7 @@ PID=$! echo "Using ldapsearch to retrieve all the entries..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -S "" -b "$BASEDN" -h localhost:$PORT > $SEARCHOUT 2>&1 + $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT > $SEARCHOUT 2>&1 RC=$? if test $RC = 1 ; then echo "Waiting 5 seconds for slapd to start..." diff --git a/tests/scripts/test000-rootdse b/tests/scripts/test000-rootdse index 205c1b5440..1264e08d15 100755 --- a/tests/scripts/test000-rootdse +++ b/tests/scripts/test000-rootdse @@ -35,7 +35,7 @@ fi echo "Using ldapsearch to retrieve all the entries..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -b "" -s base -h localhost:$PORT 'extensibleObject' > $SEARCHOUT 2>&1 + $LDAPSEARCH -b "" -s base -h $LOCALHOST -p $PORT 'extensibleObject' > $SEARCHOUT 2>&1 RC=$? if test $RC = 1 ; then echo "Waiting 5 seconds for slapd to start..." diff --git a/tests/scripts/test001-slapadd b/tests/scripts/test001-slapadd index a839be1c4f..dc72b93302 100755 --- a/tests/scripts/test001-slapadd +++ b/tests/scripts/test001-slapadd @@ -43,7 +43,7 @@ fi echo "Using ldapsearch to retrieve all the entries..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -S "" -b "$BASEDN" -h localhost:$PORT > $SEARCHOUT 2>&1 + $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT > $SEARCHOUT 2>&1 RC=$? if test $RC = 1 ; then echo "Waiting 5 seconds for slapd to start..." diff --git a/tests/scripts/test002-populate b/tests/scripts/test002-populate index 9318b65205..81ad49508a 100755 --- a/tests/scripts/test002-populate +++ b/tests/scripts/test002-populate @@ -32,7 +32,7 @@ fi echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -42,7 +42,7 @@ for i in 0 1 2 3 4 5; do done echo "Using ldapadd to populate the database..." -$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ +$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ $LDIFORDERED > $TESTOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -52,7 +52,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to read all the entries..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectclass=*' > $SEARCHOUT 2>&1 kill -HUP $PID diff --git a/tests/scripts/test003-search b/tests/scripts/test003-search index 28152ee4ad..9ecd57a071 100755 --- a/tests/scripts/test003-search +++ b/tests/scripts/test003-search @@ -49,7 +49,7 @@ fi echo "Testing slapd searching..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -67,7 +67,7 @@ fi cat /dev/null > $SEARCHOUT echo "Testing exact searching..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'sn=jensen' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" @@ -76,7 +76,7 @@ if test $RC != 0 ; then fi echo "Testing OR searching..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ '(|(undefined=fubar)(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" @@ -85,7 +85,7 @@ if test $RC != 0 ; then fi echo "Testing AND matching and ends-with searching..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ '(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" @@ -94,7 +94,7 @@ if test $RC != 0 ; then fi echo "Testing NOT searching..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ '(!(objectclass=person))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" diff --git a/tests/scripts/test004-modify b/tests/scripts/test004-modify index 2e110dd767..bcf78dde44 100755 --- a/tests/scripts/test004-modify +++ b/tests/scripts/test004-modify @@ -43,7 +43,7 @@ fi echo "Testing slapd modify operations..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -59,7 +59,7 @@ if test $RC != 0 ; then fi echo "Testing modify, add, and delete..." -$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \ +$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \ $TESTOUT 2>&1 << EOMODS version: 1 @@ -131,7 +131,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to retrieve all the entries..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectClass=*' > $SEARCHOUT 2>&1 RC=$? kill -HUP $PID diff --git a/tests/scripts/test005-modrdn b/tests/scripts/test005-modrdn index 66a1b9f271..967bb2cf19 100755 --- a/tests/scripts/test005-modrdn +++ b/tests/scripts/test005-modrdn @@ -41,7 +41,7 @@ echo "Testing slapd modrdn operations..." # Make sure we can search the database for i in 0 1 2 3 4 5; do - $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ + $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectClass=*' > $INITOUT 2>&1 RC=$? if test $RC = 1 ; then @@ -59,7 +59,7 @@ fi # -r used to do remove of old rdn echo "Testing modrdn(deleteoldrdn=0)..." -$LDAPMODRDN -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \ +$LDAPMODRDN -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \ $TESTOUT 2>&1 'cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US' 'cn=James A Jones III' RC=$? @@ -70,7 +70,7 @@ if test $RC != 0 ; then fi echo "Testing modrdn(deleteoldrdn=1)..." -$LDAPMODRDN -D "$MANAGERDN" -r -h localhost -p $PORT -w $PASSWD >> \ +$LDAPMODRDN -D "$MANAGERDN" -r -h $LOCALHOST -p $PORT -w $PASSWD >> \ $TESTOUT 2>&1 'cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US' 'cn=James A Jones II' RC=$? @@ -83,7 +83,7 @@ fi # Ensure the new rdn's can be found echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones III)..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'cn=James A Jones III' > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -110,7 +110,7 @@ fi echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones II)..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'cn=James A Jones II' > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -139,7 +139,7 @@ fi # an attribute. echo "Using ldapsearch to retrieve entries using removed rdn (cn=James A Jones 2)..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'cn=James A Jones 2' > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -155,7 +155,7 @@ if test $? != 0 ; then fi echo "Using ldapsearch to retrieve all the entries..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectClass=*' > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -181,7 +181,7 @@ fi echo "Testing modrdn(deleteoldrdn=1), modrdn with new rdn already an att val..." -$LDAPMODRDN -D "$MANAGERDN" -r -h localhost -p $PORT -w $PASSWD > \ +$LDAPMODRDN -D "$MANAGERDN" -r -h $LOCALHOST -p $PORT -w $PASSWD > \ /dev/null 2>&1 'cn=James A Jones III, ou=Alumni Association, ou=People, o=University of Michigan, c=US' 'cn=James A Jones 1' RC=$? @@ -195,7 +195,7 @@ fi # present echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones 1)..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'cn=James A Jones 1' > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then diff --git a/tests/scripts/test006-acls b/tests/scripts/test006-acls index c7e1f18697..0f0d89993a 100755 --- a/tests/scripts/test006-acls +++ b/tests/scripts/test006-acls @@ -40,7 +40,7 @@ fi echo "Testing slapd access control..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -62,10 +62,10 @@ cat /dev/null > $SEARCHOUT # give us nothing if we're not bound, and should return all attributes # if we're bound as anyone under UM. # -$LDAPSEARCH -b "$JAJDN" -h localhost -p $PORT "objectclass=*" \ +$LDAPSEARCH -b "$JAJDN" -h $LOCALHOST -p $PORT "objectclass=*" \ >> $SEARCHOUT 2>&1 -$LDAPSEARCH -b "$JAJDN" -h localhost -p $PORT \ +$LDAPSEARCH -b "$JAJDN" -h $LOCALHOST -p $PORT \ -D "$BABSDN" -w bjensen "objectclass=*" >> $SEARCHOUT 2>&1 @@ -74,7 +74,7 @@ $LDAPSEARCH -b "$JAJDN" -h localhost -p $PORT \ # fail when we add some DN other than our own, and should succeed when # we add our own DN. # bjensen -$LDAPMODIFY -D "$JAJDN" -h localhost -p $PORT -w jaj > \ +$LDAPMODIFY -D "$JAJDN" -h $LOCALHOST -p $PORT -w jaj > \ $TESTOUT 2>&1 << EOMODS1 version: 1 dn: cn=ITD Staff, ou=Groups, o=University of Michigan, c=US @@ -84,7 +84,7 @@ member: cn=Barbara Jensen, ou=Information Technology Division, ou=People, o=Univ EOMODS1 -$LDAPMODIFY -D "$JAJDN" -h localhost -p $PORT -w jaj >> \ +$LDAPMODIFY -D "$JAJDN" -h $LOCALHOST -p $PORT -w jaj >> \ $TESTOUT 2>&1 << EOMODS2 version: 1 @@ -99,7 +99,7 @@ EOMODS2 # 1) bound as "James A Jones 1" - should fail # 2) bound as "Barbara Jensen" - should succeed # -$LDAPMODIFY -D "$JAJDN" -h localhost -p $PORT -w jaj >> \ +$LDAPMODIFY -D "$JAJDN" -h $LOCALHOST -p $PORT -w jaj >> \ $TESTOUT 2>&1 << EOMODS3 dn: cn=ITD Staff, ou=Groups, o=University of Michigan, c=US @@ -108,7 +108,7 @@ delete: member EOMODS3 -$LDAPMODIFY -D "$BJORNSDN" -h localhost -p $PORT -w bjorn >> \ +$LDAPMODIFY -D "$BJORNSDN" -h $LOCALHOST -p $PORT -w bjorn >> \ $TESTOUT 2>&1 << EOMODS4 # COMMENT version: 1 @@ -124,7 +124,7 @@ ou: Groups EOMODS4 echo "Using ldapsearch to retrieve all the entries..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectClass=*' | . $LDIFFILTER >> $SEARCHOUT 2>&1 RC=$? kill -HUP $PID diff --git a/tests/scripts/test007-replication b/tests/scripts/test007-replication index 000cb22331..a0d9d49bb5 100755 --- a/tests/scripts/test007-replication +++ b/tests/scripts/test007-replication @@ -58,7 +58,7 @@ fi echo "Using ldapsearch to check that master slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -69,7 +69,7 @@ done echo "Using ldapsearch to check that slave slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -83,7 +83,7 @@ $SLURPD -f $MASTERCONF -d ${SLURPD_DEBUG-5} -t $REPLDIR > $SLURPLOG 2>&1 & SLURPPID=$! echo "Using ldapadd to populate the master directory..." -$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ +$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ $LDIFORDERED > /dev/null 2>&1 RC=$? if test $RC != 0 ; then @@ -102,7 +102,7 @@ echo "Using ldapmodify to modify master directory..." # Do some modifications # -$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \ +$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \ $TESTOUT 2>&1 << EOMODS dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US changetype: modify @@ -175,7 +175,7 @@ echo "Waiting 15 seconds for slurpd to send changes..." sleep 15 echo "Using ldapsearch to read all the entries from the master..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectclass=*' > $MASTEROUT 2>&1 if test $RC != 0 ; then @@ -186,7 +186,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to read all the entries from the slave..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \ 'objectclass=*' > $SLAVEOUT 2>&1 if test $RC != 0 ; then diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency index a4847f0527..fef0896355 100755 --- a/tests/scripts/test008-concurrency +++ b/tests/scripts/test008-concurrency @@ -45,7 +45,7 @@ fi echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -55,7 +55,7 @@ for i in 0 1 2 3 4 5; do done echo "Using tester for concurrent server access..." -$SLAPDTESTER -b "$BASEDN" -P "$PROGDIR" -d "$DATADIR" -h localhost -p $PORT -D "$MANAGERDN" -w $PASSWD -l 50 +$SLAPDTESTER -b "$BASEDN" -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT -D "$MANAGERDN" -w $PASSWD -l 50 RC=$? if test $RC != 0 ; then @@ -64,7 +64,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to retrieve all the entries..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectClass=*' > $SEARCHOUT 2>&1 RC=$? diff --git a/tests/scripts/test009-referral b/tests/scripts/test009-referral index 7f93c039de..d5fee10414 100755 --- a/tests/scripts/test009-referral +++ b/tests/scripts/test009-referral @@ -55,7 +55,7 @@ fi echo "Testing for master slapd..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -72,7 +72,7 @@ fi echo "Testing for slave slapd..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $SLAVEPORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -84,7 +84,7 @@ done cat /dev/null > $SEARCHOUT echo "Testing exact searching..." -$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ +$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \ 'sn=jensen' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" @@ -93,7 +93,7 @@ if test $RC != 0 ; then fi echo "Testing OR searching..." -$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ +$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \ '(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" @@ -102,7 +102,7 @@ if test $RC != 0 ; then fi echo "Testing AND matching and ends-with searching..." -$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ +$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \ '(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" @@ -111,7 +111,7 @@ if test $RC != 0 ; then fi echo "Testing NOT searching..." -$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ +$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \ '(!(objectclass=person))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" diff --git a/tests/scripts/test010-passwd b/tests/scripts/test010-passwd index c8753983ca..8492d96ee6 100755 --- a/tests/scripts/test010-passwd +++ b/tests/scripts/test010-passwd @@ -32,7 +32,7 @@ fi echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -42,7 +42,7 @@ for i in 0 1 2 3 4 5; do done echo "Using ldapadd to populate the database..." -$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ +$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ $LDIFPASSWD > $TESTOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -56,14 +56,14 @@ echo > $TESTOUT echo "Using ldapsearch to verify population ..." echo "++ Initial search" >> $SEARCHOUT -$LDAPSEARCH -h localhost -p $PORT \ +$LDAPSEARCH -h $LOCALHOST -p $PORT \ -D "$MANAGERDN" -w $PASSWD \ -b "$BASEDN" \ 'objectclass=*' >> $SEARCHOUT 2>&1 echo "Using ldappasswd (PASS 1) ..." echo "Pass 1" >> $TESTOUT -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w secret -s newsecret \ -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1 RC=$? @@ -72,7 +72,7 @@ if test $RC != 0 ; then kill -HUP $PID exit $RC fi -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w $PASSWD -s newsecret \ -D $MANAGERDN "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then @@ -80,7 +80,7 @@ if test $RC != 0 ; then kill -HUP $PID exit $RC fi -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w secret -s newsecret \ -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then @@ -88,7 +88,7 @@ if test $RC != 0 ; then kill -HUP $PID exit $RC fi -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w secret -s newsecret \ -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then @@ -100,7 +100,7 @@ fi echo "" >> $TESTOUT echo "Pass 2" >> $TESTOUT echo "Using ldappasswd (PASS 2) ..." -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w newsecret \ -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then @@ -108,7 +108,7 @@ if test $RC != 0 ; then kill -HUP $PID exit $RC fi -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w newsecret \ -D "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then @@ -116,7 +116,7 @@ if test $RC != 0 ; then kill -HUP $PID exit $RC fi -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w newsecret \ -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then @@ -124,7 +124,7 @@ if test $RC != 0 ; then kill -HUP $PID exit $RC fi -$LDAPPASSWD -h localhost -p $PORT \ +$LDAPPASSWD -h $LOCALHOST -p $PORT \ -w newsecret \ -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then diff --git a/tests/scripts/test011-subtree-repl b/tests/scripts/test011-subtree-repl index e7f9d8e879..c7fbc1c7cc 100755 --- a/tests/scripts/test011-subtree-repl +++ b/tests/scripts/test011-subtree-repl @@ -60,7 +60,7 @@ fi echo "Using ldapsearch to check that master slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -71,7 +71,7 @@ done echo "Using ldapsearch to check that slave slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -85,7 +85,7 @@ $SLURPD -f $SUBMASTERCONF -d ${SLURPD_DEBUG-5} -t $REPLDIR > $SLURPLOG 2>&1 & SLURPPID=$! echo "Using ldapadd to populate the master directory..." -$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ +$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ $LDIFORDERED > /dev/null 2>&1 RC=$? if test $RC != 0 ; then @@ -104,7 +104,7 @@ echo "Using ldapmodify to modify master directory..." # Do some modifications # -$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \ +$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \ $TESTOUT 2>&1 << EOMODS dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US changetype: modify @@ -177,7 +177,7 @@ echo "Waiting 15 seconds for slurpd to send changes..." sleep 15 echo "Using ldapsearch to read all the entries from the master..." -$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectclass=*' > $MASTEROUT 2>&1 if test $RC != 0 ; then @@ -188,7 +188,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to read the subtree entries from the master..." -$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h $LOCALHOST -p $PORT \ 'objectclass=*' > $SUBMASTEROUT 2>&1 if test $RC != 0 ; then @@ -199,7 +199,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to read all the entries from the slave..." -$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h localhost -p $SLAVEPORT \ +$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h $LOCALHOST -p $SLAVEPORT \ 'objectclass=*' > $SLAVEOUT 2>&1 if test $RC != 0 ; then diff --git a/tests/scripts/test012-glue b/tests/scripts/test012-glue index b6bbcb7276..7012c131d0 100755 --- a/tests/scripts/test012-glue +++ b/tests/scripts/test012-glue @@ -43,7 +43,7 @@ fi echo "Using ldapsearch to retrieve all the entries..." cd test-db for i in 0 1 2 3 4 5; do - ../$LDAPSEARCH -b "$BASEDN" -h localhost:$PORT > ../$SEARCHOUT 2>&1 + ../$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT > ../$SEARCHOUT 2>&1 RC=$? if test $RC = 1 ; then echo "Waiting 5 seconds for slapd to start..." @@ -87,7 +87,7 @@ fi echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \ + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ 'objectclass=*' > /dev/null 2>&1 RC=$? if test $RC = 1 ; then @@ -97,7 +97,7 @@ for i in 0 1 2 3 4 5; do done echo "Using ldapadd to populate the glued database..." -$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ +$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ $LDIFORDERED > $TESTOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -107,7 +107,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to read all the entries..." -$LDAPSEARCH -b "$BASEDN" -h localhost -p $PORT \ +$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT \ 'objectclass=*' > $SEARCHOUT 2>&1 kill -HUP $PID -- 2.39.2