Only look for IPv4 addresses for the kpasswd server. This is just a
authorKen Raeburn <raeburn@mit.edu>
Wed, 5 Nov 2008 17:47:00 +0000 (17:47 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 5 Nov 2008 17:47:00 +0000 (17:47 +0000)
workaround for other parts of the code failing to cope with IPv6
addresses, and won't work in an IPv6-only environment; the problem
should still be fixed for real.

ticket: 5595

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21004 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/changepw.c

index 5bd5b8678193ea2da6a49879e731d2eb9c09a214..7811387385e0bac96ff2e9c23dc41a8ce2e1f897 100644 (file)
@@ -64,11 +64,12 @@ krb5_locate_kpasswd(krb5_context context, const krb5_data *realm,
     int sockType = (useTcp ? SOCK_STREAM : SOCK_DGRAM);
 
     code = krb5int_locate_server (context, realm, addrlist,
-                                 locate_service_kpasswd, sockType, 0);
+                                 locate_service_kpasswd, sockType, AF_INET);
 
     if (code == KRB5_REALM_CANT_RESOLVE || code == KRB5_REALM_UNKNOWN) {
        code = krb5int_locate_server (context, realm, addrlist,
-                                     locate_service_kadmin, SOCK_STREAM, 0);
+                                     locate_service_kadmin, SOCK_STREAM,
+                                     AF_INET);
        if (!code) {
            /* Success with admin_server but now we need to change the
               port number to use DEFAULT_KPASSWD_PORT and the socktype.  */