testprogs: Add test for kinit with canonicalization
authorAndreas Schneider <asn@samba.org>
Wed, 9 Oct 2019 14:59:59 +0000 (16:59 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Sat, 12 Oct 2019 16:18:39 +0000 (16:18 +0000)
Pair-Programmed-With: Isaac Boukris <iboukris@redhat.com>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Isaac Boukris <iboukris@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
selftest/knownfail.d/kinit_mit [new file with mode: 0644]
testprogs/blackbox/test_kinit_mit.sh

diff --git a/selftest/knownfail.d/kinit_mit b/selftest/knownfail.d/kinit_mit
new file mode 100644 (file)
index 0000000..ef1a3d5
--- /dev/null
@@ -0,0 +1 @@
+^samba4.blackbox.kinit.kinit.with.canonicalize
index 57d0f74d28d9b50f99024741ba59789083b2fd0f..d28caecd603662345c0477adf1ee8626c113ebe0 100755 (executable)
@@ -130,6 +130,19 @@ testit "set user password with kerberos ccache" $VALGRIND $PYTHON $samba_tool us
 
 testit "enable user with kerberos cache" $VALGRIND $PYTHON $samba_enableaccount nettestuser -H ldap://$SERVER -k yes $@ || failed=`expr $failed + 1`
 
+###########################################################
+### Test kinit with canonicalization
+###########################################################
+
+# This is currently not working due to an upstream bug in MIT Kerberos. The
+# test will ensure that we get notified when we can turn on canonicalization
+# in ads_krb5_chg_password().
+# https://bugzilla.samba.org/show_bug.cgi?id=14155
+upperusername=$(echo $USERNAME | tr '[a-z]' '[A-Z]')
+testit "kinit with canonicalize" $samba_texpect $PREFIX/tmpkinitscript $samba_kinit -C $upperusername@$REALM -S kadmin/changepw@$REALM || failed=`expr $failed + 1`
+
+$samba_kdestroy
+
 ###########################################################
 ### Test kinit with user credentials
 ###########################################################