[26599] in CVS-changelog-for-Kerberos-V5
krb5 commit: Fix k5test.py hostname canonicalization
daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Jun 5 00:49:05 2012
Date: Tue, 5 Jun 2012 00:49:00 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201206050449.q554n0lF007359@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/5cf17e31800e032ad76366f38d28b2797cd595cc
commit 5cf17e31800e032ad76366f38d28b2797cd595cc
Author: Greg Hudson <ghudson@mit.edu>
Date: Tue Jun 5 00:48:37 2012 -0400
Fix k5test.py hostname canonicalization
r25844 (#7124) stopped using AI_ADDRCONFIG when canonicalizing
hostnames in sn2princ. So we need to also stop using it in k5test.c's
_get_hostname() or we could come up with a different result on a
system where forward and reverse resolution via IPv4 and IPv6 produce
different results. That in turn causes a t_gssapi.py test (the one
using the un-canonicalized hostname) to fail, because libkrb5 looks
for a different host principal than k5test.py put in the keytab.
src/util/k5test.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/util/k5test.py b/src/util/k5test.py
index 513b9c5..5adfc95 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -439,8 +439,7 @@ def _find_srctop():
def _get_hostname():
hostname = socket.gethostname()
try:
- ai = socket.getaddrinfo(hostname, None, 0, 0, 0,
- socket.AI_CANONNAME | socket.AI_ADDRCONFIG)
+ ai = socket.getaddrinfo(hostname, None, 0, 0, 0, socket.AI_CANONNAME)
except socket.gaierror, (error, errstr):
fail('Local hostname "%s" does not resolve: %s.' % (hostname, errstr))
(family, socktype, proto, canonname, sockaddr) = ai[0]
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5