AIX 5.3: kinit(v5): Cannot resolve network address for KDC in

Christoph Weizen cwei at gmx.net
Thu Nov 10 14:21:59 EST 2005


Hi Lamar,

I applied the two patches, and it works - thanks a lot!
Donn Cave send a similar working patch: ;)

    Donn Cave, donn at u.washington.edu
-----------------------------------
*** include/fake-addrinfo.h.dist        Wed Jun  1 12:24:32 2005
--- include/fake-addrinfo.h     Fri Aug 12 09:10:48 2005
***************
*** 1193,1199 ****
          a known service name for tcp or udp (as appropriate), an error
          code (for "host not found") is returned.  If the port maps to a
          known service for both udp and tcp, all is well.  */
!     if (serv && serv[0] && isdigit(serv[0])) {
         unsigned long lport;
         char *end;
         lport = strtoul(serv, &end, 10);
--- 1193,1208 ----
          a known service name for tcp or udp (as appropriate), an error
          code (for "host not found") is returned.  If the port maps to a
          known service for both udp and tcp, all is well.  */
!     /*
!     **
!     **  However, where AI_NUNERICSERV is defined (AIX 5) and was
specified,
!     **  this is unneeded and and broken - "discard" is not numeric.
!     */
!     if (serv && serv[0]
! #ifdef AI_NUMERICSERV
!              && !(hint->ai_flags & AI_NUMERICSERV)
! #endif
!              && isdigit(serv[0])) {
         unsigned long lport;
         char *end;
         lport = strtoul(serv, &end, 10);

cheers,
Christoph

Lamar.Saxon at americredit.com wrote:
> Christopher,
> 
> 	I had the exact same problem.  I was given 2 patches for KRB
> 1.4.1 and it fixed the problem.  I applied the patches to my 1.4.2
> source and the problem is resolved there too.  Here are the patches:
> 
> DNSGLUE.C Patch:
> 
> *** ./src/lib/krb5/os/dnsglue.c.orig    Fri Jan 14 17:10:53 2005
> --- ./src/lib/krb5/os/dnsglue.c Thu May  5 11:39:52 2005
> ***************
> *** 62,68 ****
> --- 62,76 ----
>                  char *host, int nclass, int ntype)
>    {
>    #if HAVE_RES_NSEARCH
> + #ifndef LANL
>        struct __res_state statbuf;
> + #else   /* LANL */
> + #ifndef _AIX
> +     struct __res_state statbuf;
> + #else   /* _AIX */
> +     struct { struct __res_state s; char pad[1024]; } statbuf;
> + #endif  /* AIX */
> + #endif  /* LANL */
>    #endif
>        struct krb5int_dns_state *ds;
>        int len, ret;
> 
> LOCATE_KDC.C Patch:
> 
> 
>>*** ./src/lib/krb5/os/locate_kdc.c.orig Thu May  5 08:06:45 2005
>>--- ./src/lib/krb5/os/locate_kdc.c      Thu May  5 11:34:27 2005
>>***************
>>*** 267,275 ****
>>--- 267,283 ----
>>      memset(&hint, 0, sizeof(hint));
>>      hint.ai_family = family;
>>      hint.ai_socktype = socktype;
>>+ #ifndef LANL
>>  #ifdef AI_NUMERICSERV
>>      hint.ai_flags = AI_NUMERICSERV;
>>  #endif
>>+ #else   /* LANL */
>>+ #ifndef _AIX
>>+ #ifdef AI_NUMERICSERV
>>+     hint.ai_flags = AI_NUMERICSERV;
>>+ #endif
>>+ #endif  /* _AIX */
>>+ #endif  /* LANL */
>>      sprintf(portbuf, "%d", ntohs(port));
>>      sprintf(secportbuf, "%d", ntohs(secport));
>>      err = getaddrinfo (hostname, portbuf, &hint, &addrs);
> 
> 
> Credit goes to Milton Turley <mturley at lanl.gov> for the patches and
> assistance...
> 
> Let me know if it works for you...
> 
> Lamar


More information about the Kerberos mailing list