AIX 5.2 and Kerberos 1.4.1 Patches

Milton Turley mturley at lanl.gov
Thu May 5 17:08:15 EDT 2005


Following are 2 patches for kerberos 1.4.1 to build on AIX 5.2.  The 
patches are for the problem of not being able to resolve the address for 
the kdc.
The #ifndef LANL and #ifdef LANL are locale compiler directives and will 
need to be changed or specifiy -D LANL in configure process.

The patch for dsnglue.c is if "thread-support" is enabled.  The patch adds 
a 1024 byte buffer after the  _res_state structure.  IBM AIX has a problem 
where 735+- bytes are overlaid when res_ninit is called.  The 1024 bytes 
pads the storage to stop res_ninit from overlaying critical storage.  Ken 
Raeburn had tried a similar patch with 72 bytes.

>*** ./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;
The patch for locate_kdc.c is when "disable-thread-support" is set for 
configure.  Again the #ifndef LANL and #ifdef LANL is a local compiler 
directive.  This will need to be changed for local setting or -D LANL set 
for configure process.



>*** ./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);


More information about the Kerberos mailing list