1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

testprogs/blackbox: let test_trust_user_account.sh check the correct kerberos salt

This demonstrates the bug we currently have.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13539

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-09-04 10:53:52 +02:00 committed by Andrew Bartlett
parent 8526feb100
commit 1b31fa6256
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1 @@
^samba4.blackbox.trust_user_account.get.virtualKerberosSalt.for.TDA

View File

@ -37,6 +37,20 @@ export KRB5CCNAME
rm -f $KRB5CCNAME
EXPECTED_SALT="${OUR_REALM}krbtgt${REMOTE_FLAT}"
#
# Note the \$ is for the end of line in grep
#
# There must be no trailing '$' in the SALT string itself,
# it's removed from the sAMAccountName value (which includes the trailing '$')
# before construting the salt!
#
# Otherwise this would be:
# "^virtualKerberosSalt: ${EXPECTED_SALT}\\\$\$"
#
EXPECTED_GREP="^virtualKerberosSalt: ${EXPECTED_SALT}\$"
testit_grep "get virtualKerberosSalt for TDA of $REMOTE_FLAT\$" "$EXPECTED_GREP" $samba_tool user getpassword "$REMOTE_FLAT\$" $CONFIGURATION --attributes=virtualKerberosSalt || failed=`expr $failed + 1`
testit "kinit with keytab for TDA of $REMOTE_REALM" $samba4kinit -t $KEYTAB "$REMOTE_FLAT\$@$OUR_REALM" || failed=`expr $failed + 1`
rm -f $KRB5CCNAME $KEYTAB