krb5 commit [krb5-1.13]: Relax t_sn2princ.py reverse resolution test
Tom Yu
tlyu at mit.edu
Wed Jul 6 16:32:58 EDT 2016
https://github.com/krb5/krb5/commit/eaebfbd3b6200b81c2550af1cb8f58a436b11e02
commit eaebfbd3b6200b81c2550af1cb8f58a436b11e02
Author: Tom Yu <tlyu at mit.edu>
Date: Fri May 27 15:19:43 2016 -0400
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.
(back ported from commit 45b34f8e8f10009435d86195ac17e02d1dd0684e)
ticket: 8422
version_fixed: 1.13.6
tags: -pullup
status: resolved
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 de6bb0e..3b5fef8 100644
--- a/src/tests/t_sn2princ.py
+++ b/src/tests/t_sn2princ.py
@@ -73,7 +73,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:
@@ -94,8 +93,10 @@ try:
names = socket.getnameinfo(sockaddr, socket.NI_NAMEREQD)
except socket.gaierror:
skip_rest('cannot reverse resolve %s' % oname)
-if names[0].lower() != rname:
- skip_rest('%s reverse resolves to %s, not %s' % (oname, names[0], rname))
+rname = names[0].lower()
+if rname == fname:
+ skip_rest('%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')
More information about the cvs-krb5
mailing list