mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
testprogs: Reformat test_offline_logon.sh
shfmt -w -p -i 0 -fn testprogs/blackbox/test_offline_logon.sh Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
This commit is contained in:
parent
7403de7eaf
commit
0a4eb5d892
@ -3,10 +3,10 @@
|
|||||||
# Copyright (c) 2021 Andreas Schneider <asn@samba.org>
|
# Copyright (c) 2021 Andreas Schneider <asn@samba.org>
|
||||||
|
|
||||||
if [ $# -lt 9 ]; then
|
if [ $# -lt 9 ]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: test_offline_logon.sh DOMAIN CACHED_USER_NAME_1 CACHED_USER_PASS_1 CACHED_USER_NAME_2 CACHED_USER_PASS_2 ONLINE_USER_NAME_1 ONLINE_USER_PASS_1 ONLINE_USER_NAME_2 ONLINE_USER_PASS_2
|
Usage: test_offline_logon.sh DOMAIN CACHED_USER_NAME_1 CACHED_USER_PASS_1 CACHED_USER_NAME_2 CACHED_USER_PASS_2 ONLINE_USER_NAME_1 ONLINE_USER_PASS_1 ONLINE_USER_NAME_2 ONLINE_USER_PASS_2
|
||||||
EOF
|
EOF
|
||||||
exit 1;
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DOMAIN=$1
|
DOMAIN=$1
|
||||||
@ -20,24 +20,24 @@ ONLINE_USER_NAME_2=$8
|
|||||||
ONLINE_USER_PASS_2=$9
|
ONLINE_USER_PASS_2=$9
|
||||||
shift 9
|
shift 9
|
||||||
|
|
||||||
. `dirname $0`/subunit.sh
|
. $(dirname $0)/subunit.sh
|
||||||
|
|
||||||
samba_bindir="$BINDIR"
|
samba_bindir="$BINDIR"
|
||||||
wbinfo="$samba_bindir/wbinfo"
|
wbinfo="$samba_bindir/wbinfo"
|
||||||
|
|
||||||
# Check that the DC is offline
|
# Check that the DC is offline
|
||||||
testit_expect_failure "wbinfo.ping-dc" $VALGRIND $wbinfo --ping-dc || failed=`expr $failed + 1`
|
testit_expect_failure "wbinfo.ping-dc" $VALGRIND $wbinfo --ping-dc || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
# We should have cached credentials for alice and bob
|
# We should have cached credentials for alice and bob
|
||||||
# --pam-logon sets always the WBFLAG_PAM_CACHED_LOGIN flag
|
# --pam-logon sets always the WBFLAG_PAM_CACHED_LOGIN flag
|
||||||
testit "wbinfo.pam_logon_$CACHED_USER_NAME_1" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$CACHED_USER_NAME_1%$CACHED_USER_PASS_1 || failed=`expr $failed + 1`
|
testit "wbinfo.pam_logon_$CACHED_USER_NAME_1" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$CACHED_USER_NAME_1%$CACHED_USER_PASS_1 || failed=$(expr $failed + 1)
|
||||||
testit "wbinfo.kerberos_logon_$CACHED_USER_NAME_1" $VALGRIND $wbinfo --krb5auth=$DOMAIN/$CACHED_USER_NAME_2%$CACHED_USER_PASS_2 || failed=`expr $failed + 1`
|
testit "wbinfo.kerberos_logon_$CACHED_USER_NAME_1" $VALGRIND $wbinfo --krb5auth=$DOMAIN/$CACHED_USER_NAME_2%$CACHED_USER_PASS_2 || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
testit "wbinfo.pam_logon_$CACHED_USER_NAME_2" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$CACHED_USER_NAME_2%$CACHED_USER_PASS_2 || failed=`expr $failed + 1`
|
testit "wbinfo.pam_logon_$CACHED_USER_NAME_2" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$CACHED_USER_NAME_2%$CACHED_USER_PASS_2 || failed=$(expr $failed + 1)
|
||||||
testit "wbinfo.kerberos_logon_$CACHED_USER_NAME_2" $VALGRIND $wbinfo --krb5auth=$DOMAIN/$CACHED_USER_NAME_2%$CACHED_USER_PASS_2 || failed=`expr $failed + 1`
|
testit "wbinfo.kerberos_logon_$CACHED_USER_NAME_2" $VALGRIND $wbinfo --krb5auth=$DOMAIN/$CACHED_USER_NAME_2%$CACHED_USER_PASS_2 || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
# We should not be able to auth with jane or joe
|
# We should not be able to auth with jane or joe
|
||||||
testit_expect_failure "wbinfo.pam_logon_$ONLINE_USER_NAME_1" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$ONLINE_USER_NAME_1%$ONLINE_USER_PASS_1 || failed=`expr $failed + 1`
|
testit_expect_failure "wbinfo.pam_logon_$ONLINE_USER_NAME_1" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$ONLINE_USER_NAME_1%$ONLINE_USER_PASS_1 || failed=$(expr $failed + 1)
|
||||||
testit_expect_failure "wbinfo.pam_logon_$ONLINE_USER_NAME_2" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$ONLINE_USER_NAME_2%$ONLINE_USER_PASS_2 || failed=`expr $failed + 1`
|
testit_expect_failure "wbinfo.pam_logon_$ONLINE_USER_NAME_2" $VALGRIND $wbinfo --pam-logon=$DOMAIN/$ONLINE_USER_NAME_2%$ONLINE_USER_PASS_2 || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
exit $failed
|
exit $failed
|
||||||
|
Loading…
Reference in New Issue
Block a user