]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Disable canonicalization in ccselect tests 807/head
authorGreg Hudson <ghudson@mit.edu>
Wed, 4 Jul 2018 16:11:45 +0000 (16:11 +0000)
committerGreg Hudson <ghudson@mit.edu>
Thu, 5 Jul 2018 17:33:13 +0000 (13:33 -0400)
DNS canonicalization can interfere with the fallback tests by changing
"localhost" to have multiple components, or (less likely) changing the
parent domain of foo.krbtest.com or foo.krbtest2.com.

src/tests/gssapi/t_ccselect.py

index 3503f92699b1114520dbb38343c728da899872c9..2c65d39d7933ee6345191547e362db00f8258b3a 100755 (executable)
 
 from k5test import *
 
-# Create two independent realms (no cross-realm TGTs).
-r1 = K5Realm(create_user=False)
-r2 = K5Realm(create_user=False, realm='KRBTEST2.COM', portbase=62000,
-             testdir=os.path.join(r1.testdir, 'r2'))
+# Create two independent realms (no cross-realm TGTs).  For the
+# fallback realm tests we need to control the precise server hostname,
+# so turn off DNS canonicalization.
+conf = {'libdefaults': {'dns_canonicalize_hostname': 'false'}}
+r1 = K5Realm(create_user=False, krb5_conf=conf)
+r2 = K5Realm(create_user=False, krb5_conf=conf, realm='KRBTEST2.COM',
+             portbase=62000, testdir=os.path.join(r1.testdir, 'r2'))
 
 host1 = 'p:' + r1.host_princ
 host2 = 'p:' + r2.host_princ