diff options
author | Andreas Schneider <asn@samba.org> | 2016-09-19 13:27:30 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-09-25 09:05:27 +0200 |
commit | 7f14776ba7704bdefcbd6ad71856b6efdeacf052 (patch) | |
tree | c8a2f4d7ef9409d838f8c0de9932294ac39e0d0d | |
parent | 2dac25249749734dfc2f27cb10088e97cecdc6ad (diff) | |
download | samba-7f14776ba7704bdefcbd6ad71856b6efdeacf052.tar.gz |
nsswitch: Use own credential cache for wbinfo tests
If we do not set it will add the credentials to the system default
credential cache, which is e.g. FILE:/tmp/krb5cc_1000.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rwxr-xr-x | nsswitch/tests/test_wbinfo.sh | 10 | ||||
-rwxr-xr-x | nsswitch/tests/test_wbinfo_simple.sh | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh index 1d14ca3919f..69cc437f821 100755 --- a/nsswitch/tests/test_wbinfo.sh +++ b/nsswitch/tests/test_wbinfo.sh @@ -51,6 +51,12 @@ knownfail() { return $status } +KRB5CCNAME_PATH="$PREFIX/test_wbinfo_krb5ccache" +rm -f $KRB5CCNAME_PATH + +KRB5CCNAME="FILE:$KRB5CCNAME_PATH" +export KRB5CCNAME + # List users testit "wbinfo -u against $TARGET" $wbinfo -u || failed=`expr $failed + 1` # List groups @@ -244,8 +250,10 @@ testit "wbinfo --getdcname against $TARGET" $wbinfo --getdcname=$DOMAIN testit "wbinfo -p against $TARGET" $wbinfo -p || failed=`expr $failed + 1` -testit "wbinfo -K against $TARGET with domain creds" $wbinfo -K "$DOMAIN/$USERNAME"%"$PASSWORD" || failed=`expr $failed + 1` +testit "wbinfo -K against $TARGET with domain creds" $wbinfo --krb5ccname=$KRB5CCNAME --krb5auth="$DOMAIN/$USERNAME"%"$PASSWORD" || failed=`expr $failed + 1` testit "wbinfo --separator against $TARGET" $wbinfo --separator || failed=`expr $failed + 1` +rm -f $KRB5CCNAME_PATH + exit $failed diff --git a/nsswitch/tests/test_wbinfo_simple.sh b/nsswitch/tests/test_wbinfo_simple.sh index dc90ddcadf0..35adb6c6d72 100755 --- a/nsswitch/tests/test_wbinfo_simple.sh +++ b/nsswitch/tests/test_wbinfo_simple.sh @@ -12,6 +12,14 @@ ADDARGS="$*" incdir=`dirname $0`/../../testprogs/blackbox . $incdir/subunit.sh -testit "wbinfo" $VALGRIND $BINDIR/wbinfo $ADDARGS || failed=`expr $failed + 1` +KRB5CCNAME_PATH="$PREFIX/test_wbinfo_simple_krb5ccname" +rm -f $KRB5CCNAME_PATH + +KRB5CCNAME="FILE:$KRB5CCNAME_PATH" +export KRB5CCNAME + +testit "wbinfo" $VALGRIND $BINDIR/wbinfo --krb5ccname="$KRB5CCNAME" $ADDARGS || failed=`expr $failed + 1` + +rm -f $KRB5CCNAME_PATH testok $0 $failed |