1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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>
This commit is contained in:
Andreas Schneider 2016-09-19 13:27:30 +02:00 committed by Stefan Metzmacher
parent 2dac252497
commit 7f14776ba7
2 changed files with 18 additions and 2 deletions

View File

@ -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

View File

@ -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