krb5 commit [krb5-1.16]: Disable canonicalization in ccselect tests

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/0155aa1220a850ee9d8d0ec387cd8c7f76790c9e
commit 0155aa1220a850ee9d8d0ec387cd8c7f76790c9e
Author: Greg Hudson <[email protected]>
Date:   Wed Jul 4 16:11:45 2018 +0000

    Disable canonicalization in ccselect tests
    
    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.
    
    (cherry picked from commit b5457d8fb719a583b89e1ace186301a144e2c4c9)

 src/tests/gssapi/t_ccselect.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/tests/gssapi/t_ccselect.py b/src/tests/gssapi/t_ccselect.py
index 3503f92..2c65d39 100755
--- a/src/tests/gssapi/t_ccselect.py
+++ b/src/tests/gssapi/t_ccselect.py
@@ -24,10 +24,13 @@
 
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.