[4058] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: [krbdev.mit.edu #1392] getaddrinfo wrapper not good enough on AIX

daemon@ATHENA.MIT.EDU (donn@u.washington.edu via RT)
Wed Apr 2 15:19:00 2003

Date: Wed, 2 Apr 2003 15:03:53 -0500 (EST)
Mail-Followup-To: rt@krbdev.mit.edu
Message-Id: <rt-1392-5608.17.2740166446142@krbdev.mit.edu>
In-Reply-To: <rt-1392@krbdev.mit.edu>
From: "donn@u.washington.edu via RT" <rt-comment@krbdev.mit.edu>
Mail-Copies-To: never
To: raeburn@mit.edu
cc: krb5-prs@mit.edu
Reply-To: rt-comment@krbdev.mit.edu
Errors-To: krb5-bugs-bounces@mit.edu

Quoth Ken Raeburn <raeburn@MIT.EDU>:
| Hi, Don.  Could you try out the attached patch and let me know if it
| fixes the ai_canonname problems we were discussing for you?

It does, sort of.  I hadn't actually even built 1.3 on AIX,
only tried fake-addrinfo.h on its own, but before trying your
patch I built it straight and verified that there actually is
a problem.  And there is:
   $ ./telnet -a homer.u
   telnet: system library bug? getaddrinfo returns numeric address
           as canonical name of homer.u
   Trying 140.142.15.37...
   telnet: connect to address 140.142.15.37: Can't assign requested address
   telnet: Unable to connect to remote host: Can't assign requested address

After applying your patch, the "system library bug?" line went away.

The last two stayed, though, because of another problem in fake-addrinfo.h,
it applies the service host value that would have been computed if the
service were numeric, even when the service was not numeric and that value
was never computed.  I hacked in a solution, context diff appended.

Finally, of course it still didn't work because the returned host name
is not canonical in the sense of reverse-lookup stable, but I gather
this is not the problem you're trying to solve here.

	Donn Cave, University Computing Services, University of Washington
	donn@u.washington.edu
-----------------------------
*** fake-addrinfo.h.p1  Wed Apr  2 09:46:08 2003
--- fake-addrinfo.h     Wed Apr  2 11:51:06 2003
***************
*** 1054,1060 ****
  #endif

  #ifdef NUMERIC_SERVICE_BROKEN
!     for (ai = *result; ai; ai = ai->ai_next) {
        if (socket_type != 0 && ai->ai_socktype == 0)
            /* Is this check actually needed?  */
            ai->ai_socktype = socket_type;
--- 1054,1060 ----
  #endif

  #ifdef NUMERIC_SERVICE_BROKEN
!     if (service_port) for (ai = *result; ai; ai = ai->ai_next) {
        if (socket_type != 0 && ai->ai_socktype == 0)
            /* Is this check actually needed?  */
            ai->ai_socktype = socket_type;

_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
http://mailman.mit.edu/mailman/listinfo/krb5-bugs

home help back first fref pref prev next nref lref last post