[krbdev.mit.edu #5393] krb5-1.6: tcp kpasswd service required if only admin_server is specified in krb5.conf

Jeffrey Altman via RT rt-comment at krbdev.mit.edu
Thu Jan 18 09:54:12 EST 2007


The problem of course was a bug in the patch.  == instead of =.
Here is the corrected version.


Index: changepw.c
===================================================================
--- changepw.c  (revision 19063)
+++ changepw.c  (working copy)
@@ -70,12 +70,14 @@
                                      locate_service_kadmin,
SOCK_STREAM, 0);
        if (!code) {
            /* Success with admin_server but now we need to change the
-              port number to use DEFAULT_KPASSWD_PORT.  */
+              port number to use DEFAULT_KPASSWD_PORT and the socktype.  */
            int i;
            for (i=0; i<addrlist->naddrs; i++) {
                struct addrinfo *a = addrlist->addrs[i].ai;
                if (a->ai_family == AF_INET)
                    sa2sin (a->ai_addr)->sin_port =
htons(DEFAULT_KPASSWD_PORT);
+               if (sockType != SOCK_STREAM)
+                   a->ai_socktype = sockType;
            }
        }
     }




More information about the krb5-bugs mailing list