Diff for /tests/scripts/test010-passwd between versions 1.13.2.5 and 1.14

version 1.13.2.5, 2005/01/20 17:01:21 version 1.14, 2003/06/04 10:06:46
Line 1 Line 1
 #! /bin/sh  #! /bin/sh
 # $OpenLDAP: pkg/ldap/tests/scripts/test010-passwd,v 1.13.2.4 2004/01/01 18:16:43 kurt Exp $  # $OpenLDAP: pkg/ldap/tests/scripts/test010-passwd,v 1.13 2003/04/30 01:04:18 hyc Exp $
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.  
 ##  SRCDIR="."
 ## Copyright 1998-2005 The OpenLDAP Foundation.  if test $# -ge 1 ; then
 ## All rights reserved.          SRCDIR=$1; shift
 ##  fi
 ## Redistribution and use in source and binary forms, with or without  
 ## modification, are permitted only as authorized by the OpenLDAP  . $SRCDIR/scripts/args.sh $*
 ## Public License.  
 ##  
 ## A copy of this license is available in the file LICENSE in the  
 ## top-level directory of the distribution or, alternatively, at  
 ## <http://www.OpenLDAP.org/license.html>.  
   
 echo "running defines.sh"  echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh  . $SRCDIR/scripts/defines.sh
   
 mkdir -p $TESTDIR $DBDIR1  echo "Cleaning up in $DBDIR..."
   
 echo "Starting slapd on TCP/IP port $PORT1..."  rm -f $DBDIR/[!C]*
 . $CONFFILTER $BACKEND $MONITORDB < $PWCONF > $CONF1  
 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &  echo "Starting slapd on TCP/IP port $PORT..."
   . $CONFFILTER $BACKEND $MONITORDB < $PWCONF > $DBCONF
   $SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
 PID=$!  PID=$!
 if test $WAIT != 0 ; then  if test $WAIT != 0 ; then
     echo PID $PID      echo PID $PID
     read foo      read foo
 fi  fi
 KILLPIDS="$PID"  
   
 echo "Using ldapsearch to check that slapd is running..."  echo "Using ldapsearch to check that slapd is running..."
 for i in 0 1 2 3 4 5; do  for i in 0 1 2 3 4 5; do
         $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \          $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
                 'objectclass=*' > /dev/null 2>&1                  'objectclass=*' > /dev/null 2>&1
         RC=$?          RC=$?
         if test $RC = 0 ; then          if test $RC = 0 ; then
Line 41  for i in 0 1 2 3 4 5; do Line 37  for i in 0 1 2 3 4 5; do
 done  done
   
 echo "Using ldapadd to populate the database..."  echo "Using ldapadd to populate the database..."
 $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \  $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
         $LDIFPASSWD > $TESTOUT 2>&1          $LDIFPASSWD > $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldapadd failed ($RC)!"          echo "ldapadd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
   
Line 55  echo > $TESTOUT Line 51  echo > $TESTOUT
   
 echo "Using ldapsearch to verify population ..."  echo "Using ldapsearch to verify population ..."
 echo "++ Initial search" >> $SEARCHOUT  echo "++ Initial search" >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 \  $LDAPSEARCH -h $LOCALHOST -p $PORT \
         -D "$MANAGERDN" -w $PASSWD \          -D "$MANAGERDN" -w $PASSWD \
         -b "$BASEDN" \          -b "$BASEDN" \
         'objectclass=*' >> $SEARCHOUT 2>&1          'objectclass=*' >> $SEARCHOUT 2>&1
   
 echo "Using ldappasswd (PASS 1)  ..."  echo "Using ldappasswd (PASS 1)  ..."
 echo "Pass 1" >> $TESTOUT  echo "Pass 1" >> $TESTOUT
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w secret -s newsecret \          -w secret -s newsecret \
         -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1          -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w $PASSWD -s newsecret \          -w $PASSWD -s newsecret \
         -D "$MANAGERDN" "cn=smd5, $BASEDN" >> $TESTOUT 2>&1          -D "$MANAGERDN" "cn=smd5, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w secret -s newsecret \          -w secret -s newsecret \
         -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1          -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w secret -s newsecret \          -w secret -s newsecret \
         -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1          -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
   
 echo "" >> $TESTOUT  echo "" >> $TESTOUT
 echo "Pass 2" >> $TESTOUT  echo "Pass 2" >> $TESTOUT
 echo "Using ldappasswd (PASS 2)  ..."  echo "Using ldappasswd (PASS 2)  ..."
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w newsecret \          -w newsecret \
         -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1          -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w newsecret \          -w newsecret \
         -D "cn=smd5, $BASEDN" >> $TESTOUT 2>&1          -D "cn=smd5, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w newsecret \          -w newsecret \
         -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1          -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \  $LDAPPASSWD -h $LOCALHOST -p $PORT \
         -w newsecret \          -w newsecret \
         -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1          -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldappasswd failed ($RC)!"          echo "ldappasswd failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
   
 test $KILLSERVERS != no && kill -HUP $KILLPIDS  kill -HUP $PID
   
 echo ">>>>> Test succeeded"  echo ">>>>> Test succeeded"
   
 exit 0  exit 0

Removed from v.1.13.2.5  
changed lines
  Added in v.1.14


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org