[11127] in Kerberos-V5-bugs
[krbdev.mit.edu #6534] getaddrinfo in
daemon@ATHENA.MIT.EDU (Greg Hudson via RT)
Wed Aug 26 14:54:50 2009
X-Barracuda-Envelope-From: rt@krbdev.mit.edu
Mail-Followup-To: rt@krbdev.mit.edu
mail-copies-to: never
From: "Greg Hudson via RT" <rt-comment@krbdev.MIT.EDU>
In-Reply-To: <rt-6534@krbdev.mit.edu>
Message-ID: <rt-6534-31638.14.6294828547977@krbdev.mit.edu>
To: "'AdminCc of krbdev.mit.edu Ticket #6534'":;"'AdminCc of krbdev.mit.edu Ticket #6534'":;@MIT.EDU
Date: Wed, 26 Aug 2009 18:54:27 +0000 (UTC)
Reply-To: rt-comment@krbdev.MIT.EDU
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krb5-bugs-bounces@mit.edu
Thanks for the report and proposed fix.
I have an idea for fixing the problem more robustly. I don't have any
better ideas than yours on how to detect whether we need the workaround,
but when we do apply the workaround, we shouldn't need to make
assumptions about whether the system getaddrinfo() allocated
ai_canonname or not. What we should do instead is:
1. Store the system getaddrinfo result in a temporary.
2. Construct our own copy of the result, allocated with our own code,
containing the modified ai_canonname fields.
3. Free the system getaddrinfo result with the system freeaddrinfo.
4. When our freeaddrinfo wrapper is called, use our own code to free the
addrinfo structure, which we know was constructed with our own code.
I will likely apply your patch in addition so that we aren't doing
unnecessary extra work on modern Linux systems.
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs