summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2022-04-22 15:46:05 +0200
committerPavel Filipensky <pfilipensky@samba.org>2022-08-10 09:22:30 +0000
commitc7d013420472406032b227ead3c939984fb357a6 (patch)
tree20410060cedb11f70daeaa4be66a593b950fedaa /testprogs
parent0a4eb5d8922ef5a464a869572efbb05a7fd78bcc (diff)
downloadsamba-c7d013420472406032b227ead3c939984fb357a6.tar.gz
testprogs: Reformat test_old_enctypes.sh
shfmt -w -p -i 0 -fn testprogs/blackbox/test_old_enctypes.sh Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/test_old_enctypes.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/testprogs/blackbox/test_old_enctypes.sh b/testprogs/blackbox/test_old_enctypes.sh
index 794a265940e..9119cb3f899 100755
--- a/testprogs/blackbox/test_old_enctypes.sh
+++ b/testprogs/blackbox/test_old_enctypes.sh
@@ -1,10 +1,10 @@
#!/bin/bash
if [ $# -lt 5 ]; then
-cat <<EOF
+ cat <<EOF
Usage: test_primary_group.sh SERVER USERNAME PASSWORD NETBIOSNAME PREFIX_ABS
EOF
-exit 1;
+ exit 1
fi
SERVER=$1
@@ -30,38 +30,38 @@ if [ -x "$samba4bindir/ldbsearch" ]; then
ldbsearch="$samba4bindir/ldbsearch"
fi
-. `dirname $0`/subunit.sh
-. `dirname $0`/common_test_fns.inc
+. $(dirname $0)/subunit.sh
+. $(dirname $0)/common_test_fns.inc
out="${PREFIX_ABS}/tmpldbsearch.out"
-$ldbsearch -H ldap://$SERVER -U$USERNAME%$PASSWORD -d0 sAMAccountName="$NETBIOSNAME\$" dn msDS-SupportedEncryptionTypes > $out
-testit_grep "find my dn" msDS-SupportedEncryptionTypes cat $out || failed=`expr $failed + 1`
+$ldbsearch -H ldap://$SERVER -U$USERNAME%$PASSWORD -d0 sAMAccountName="$NETBIOSNAME\$" dn msDS-SupportedEncryptionTypes >$out
+testit_grep "find my dn" msDS-SupportedEncryptionTypes cat $out || failed=$(expr $failed + 1)
my_dn=$(cat $out | sed -n 's/^dn: //p')
my_encs=$(cat $out | sed -n 's/^msDS-SupportedEncryptionTypes: //p')
-my_test_encs=`expr $my_encs + 3`
+my_test_encs=$(expr $my_encs + 3)
ldif="${PREFIX_ABS}/tmpldbmodify.ldif"
-cat > $ldif <<EOF
+cat >$ldif <<EOF
dn: $my_dn
changetype: modify
replace: msDS-SupportedEncryptionTypes
msDS-SupportedEncryptionTypes: $my_test_encs
EOF
-testit "Change msDS-SupportedEncryptionTypes to $my_test_encs" $VALGRIND $ldbmodify -H ldap://$SERVER -U$USERNAME%$PASSWORD -d0 < $ldif || failed=`expr $failed + 1`
+testit "Change msDS-SupportedEncryptionTypes to $my_test_encs" $VALGRIND $ldbmodify -H ldap://$SERVER -U$USERNAME%$PASSWORD -d0 <$ldif || failed=$(expr $failed + 1)
kt=${PREFIX_ABS}/tmp_host_out_keytab
testit "Export keytab while old enctypes are supported" $samba_tool domain exportkeytab --principal=$NETBIOSNAME\$ $kt
-cat > $ldif <<EOF
+cat >$ldif <<EOF
dn: $my_dn
changetype: modify
replace: msDS-SupportedEncryptionTypes
msDS-SupportedEncryptionTypes: $my_encs
EOF
-testit "Change msDS-SupportedEncryptionTypes back to $my_encs" $VALGRIND $ldbmodify -H ldap://$SERVER -U$USERNAME%$PASSWORD -d0 < $ldif || failed=`expr $failed + 1`
+testit "Change msDS-SupportedEncryptionTypes back to $my_encs" $VALGRIND $ldbmodify -H ldap://$SERVER -U$USERNAME%$PASSWORD -d0 <$ldif || failed=$(expr $failed + 1)
rm -rf $kt $out $ldif