mirror of
https://github.com/samba-team/samba.git
synced 2025-02-01 05:47:28 +03:00
testprogs: Reformat test_ktpass.sh
shfmt -w -p -i 0 -fn testprogs/blackbox/test_ktpass.sh Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Aug 4 13:49:54 UTC 2022 on sn-devel-184
This commit is contained in:
parent
faf8c190b4
commit
2120b21587
@ -1,17 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
cat <<EOF
|
||||
cat <<EOF
|
||||
Usage: blackbox_newuser.sh PREFIX
|
||||
EOF
|
||||
exit 1;
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PREFIX="$1"
|
||||
shift 1
|
||||
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
. $(dirname $0)/subunit.sh
|
||||
|
||||
samba_tool="$BINDIR/samba-tool"
|
||||
samba4bindir="$BINDIR"
|
||||
@ -25,18 +24,18 @@ CONFIG="--configfile=$PREFIX/etc/smb.conf"
|
||||
|
||||
TESTUSER="ktpassUser"
|
||||
|
||||
testit "user create" $PYTHON $samba_tool user create $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
|
||||
testit "user create" $PYTHON $samba_tool user create $CONFIG $TESTUSER testp@ssw0Rd || failed=$(expr $failed + 1)
|
||||
|
||||
KRB5CCNAME="$PREFIX/tmpccache"
|
||||
samba4kinit="$samba4kinit_binary -c $KRB5CCNAME"
|
||||
export KRB5CCNAME
|
||||
echo "testp@ssw0Rd" >$PREFIX/tmppassfile
|
||||
testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile $TESTUSER@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1`
|
||||
testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BINDIR/bin|| failed=`expr $failed + 1`
|
||||
testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile $TESTUSER@SAMBA.EXAMPLE.COM || failed=$(expr $failed + 1)
|
||||
testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BINDIR/bin || failed=$(expr $failed + 1)
|
||||
|
||||
rm -f $KRB5CCNAME
|
||||
|
||||
testit "kinit with keytab" $samba4kinit -e arcfour-hmac-md5 --use-keytab -t $PREFIX/testuser.kt $TESTUSER@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1`
|
||||
testit "kinit with keytab" $samba4kinit -e arcfour-hmac-md5 --use-keytab -t $PREFIX/testuser.kt $TESTUSER@SAMBA.EXAMPLE.COM || failed=$(expr $failed + 1)
|
||||
|
||||
rm -f $PREFIX/tmpccache $PREFIX/testuser.kt
|
||||
exit $failed
|
||||
|
Loading…
x
Reference in New Issue
Block a user