[11895] in Kerberos-V5-bugs
[krbdev.mit.edu #6868] SVN Commit
daemon@ATHENA.MIT.EDU (Greg Hudson via RT)
Sun Feb 13 16:14:03 2011
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-6868@krbdev.mit.edu>
Message-ID: <rt-6868-33791.4.43903876079524@krbdev.mit.edu>
To: "'AdminCc of krbdev.mit.edu Ticket #6868'":;"'AdminCc of krbdev.mit.edu Ticket #6868'":;@MIT.EDU
Date: Sun, 13 Feb 2011 16:14:01 -0500 (EST)
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
Restructure the locate_kdc and sendto_kdc code to defer getaddrinfo
calls until we need the answer. This requires many changes:
* struct addrlist is now called struct serverlist, and is declared in
os-proto.h instead of k5-int.h. It contains an array of struct
server_entry structures which can hold either a name or an address.
(Address entries are used for locate_kdc module results.)
* The connection state list is now a linked list, and holds address
information directly instead of using a struct addrinfo (this
simplifies memory management). Each connection entry contains a
callback buffer (previously stored in a separate array) and an index
into the server list.
* The {addrstate} trace formatting primitive is no longer needed, and
has been replaced by {connstate}. There is also a new tracing event
for resolving hostnames.
* locate_server, locate_kdc, free_serverlist, and sendto get their
prefixes changed from krb5int_ to k5_ as their prototypes were being
adjusted anyway. The family argument is gone from the locate
functions as it was never productively used. k5_sendto now receives
the socket types of interest.
* krb5_sendto_kdc will now pass a 0 socktype to k5_locate_kdc if both
socket types are wanted. There were some allowances for this in
locate but this was never previously done. In order to be
conservative when invoking locate modules, we always pass an
explicit socktype, thus calling lookup twice (as we did before,
albeit with a separate init/fini cycle) in the common case. When
creating hostname entries in serverlist from profile configuration,
we preserve the 0 value of socktype, and later create both TCP and
UDP addresses from the getaddrinfo results when the host is
resolved.
* Some accessor functions previously used by libkrb4 have been removed
as they impinged upon this work.
http://src.mit.edu/fisheye/changelog/krb5/?cs=24635
Commit By: ghudson
Revision: 24635
Changed Files:
U trunk/src/include/cm.h
U trunk/src/include/k5-int.h
U trunk/src/include/k5-trace.h
U trunk/src/lib/krb5/libkrb5.exports
U trunk/src/lib/krb5/os/accessor.c
U trunk/src/lib/krb5/os/changepw.c
U trunk/src/lib/krb5/os/hst_realm.c
U trunk/src/lib/krb5/os/locate_kdc.c
U trunk/src/lib/krb5/os/os-proto.h
U trunk/src/lib/krb5/os/sendto_kdc.c
U trunk/src/lib/krb5/os/t_locate_kdc.c
U trunk/src/lib/krb5/os/t_std_conf.c
U trunk/src/lib/krb5/os/trace.c
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs