From: Quanah Gibson-Mount Date: Mon, 30 Jan 2023 22:06:06 +0000 (+0000) Subject: ITS#9718 - Fix nonportable sed usage X-Git-Tag: OPENLDAP_REL_ENG_2_6_4~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc5d35f8a16a17dfd1c7f13ff7f45180314912cf;p=thirdparty%2Fopenldap.git ITS#9718 - Fix nonportable sed usage --- diff --git a/tests/scripts/test022-ppolicy b/tests/scripts/test022-ppolicy index 6a9cc6caed..292a97c1bf 100755 --- a/tests/scripts/test022-ppolicy +++ b/tests/scripts/test022-ppolicy @@ -105,7 +105,7 @@ fi DELAYATTR=`$LDAPSEARCH -D "$MANAGERDN" -H $URI1 -w $PASSWD -b "$USER" -E accountUsability 1.1` echo "$DELAYATTR" >> $SEARCHOUT -DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*seconds_before_unlock=\(\d*\)/\1/p'` +DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*seconds_before_unlock=\([[:digit:]]*\)/\1/p'` echo "Waiting $DELAY seconds for lockout to reset..." sleep $DELAY @@ -122,7 +122,7 @@ fi DELAYATTR=`$LDAPSEARCH -D "$MANAGERDN" -H $URI1 -w $PASSWD -b "$USER" -E accountUsability 1.1` echo "$DELAYATTR" >> $SEARCHOUT -DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\(\d*\)/\1/p'` +DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\([[:digit:]]*\)/\1/p'` echo "Testing password expiration" echo "Waiting $DELAY seconds for password to expire..." @@ -493,7 +493,7 @@ $LDAPSEARCH -e ppolicy -H $URI1 -D "$USER" -w $PASS \ DELAYATTR=`$LDAPSEARCH -D "$MANAGERDN" -H $URI1 -w $PASSWD -b "$USER" -E accountUsability 1.1` echo "$DELAYATTR" >> $SEARCHOUT -DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\(\d*\)/\1/p'` +DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\([[:digit:]]*\)/\1/p'` echo "Waiting $DELAY seconds for password to expire..." sleep $DELAY @@ -739,7 +739,7 @@ EOMODS DELAYATTR=`$LDAPSEARCH -D "$MANAGERDN" -H $URI1 -w $PASSWD -b "$USER" -E accountUsability 1.1` echo "$DELAYATTR" >> $TESTOUT -DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\(\d*\)/\1/p'` +DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\([[:digit:]]*\)/\1/p'` DELAY=`expr $DELAY - 10` echo "Testing password expiration"