diff options
author | Tom Yu <tlyu@mit.edu> | 2016-05-27 15:19:43 -0400 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2016-07-06 16:22:30 -0400 |
commit | 0e68b76e2ef6f88a1272594e43ae64315ec52676 (patch) | |
tree | a781866e59706b7adb1ab0ccc21e4e091245e948 | |
parent | 75bb0f2c25ea78bef97e95fd6086d8b5c205d224 (diff) | |
download | krb5-0e68b76e2ef6f88a1272594e43ae64315ec52676.zip krb5-0e68b76e2ef6f88a1272594e43ae64315ec52676.tar.gz krb5-0e68b76e2ef6f88a1272594e43ae64315ec52676.tar.bz2 |
Relax t_sn2princ.py reverse resolution test
Relax t_sn2princ.py check of the reverse resolution of the test
hostname. The new requirement is that it be different from the
forward resolved hostname. (There is also an existing implicit
requirement that it be in the mit.edu domain.) This makes
t_sn2princ.py more robust against changes in the reverse resolution of
the test hostname.
(cherry picked from commit 45b34f8e8f10009435d86195ac17e02d1dd0684e)
ticket: 8422
version_fixed: 1.14.3
-rwxr-xr-x | src/tests/t_sn2princ.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tests/t_sn2princ.py b/src/tests/t_sn2princ.py index 4d27c6f..6a349c4 100755 --- a/src/tests/t_sn2princ.py +++ b/src/tests/t_sn2princ.py @@ -69,7 +69,6 @@ if offline: # and reverse resolving to these names. oname = 'ptr-mismatch.kerberos.org' fname = 'www.kerberos.org' -rname = 'kerberos-org.mit.edu' # Verify forward resolution before testing for it. try: @@ -91,9 +90,11 @@ try: names = socket.getnameinfo(sockaddr, socket.NI_NAMEREQD) except socket.gaierror: skip_rest('reverse sn2princ tests', 'cannot reverse resolve %s' % oname) -if names[0].lower() != rname: +rname = names[0].lower() +if rname == fname: skip_rest('reverse sn2princ tests', - '%s reverse resolves to %s, not %s' % (oname, names[0], rname)) + '%s reverse resolves to %s ' + 'which should be different from %s' % (oname, rname, fname)) # Test default canonicalization (forward and reverse lookup). test(oname, rname, 'R3') |