another ldap bug
Will Fiveash
William.Fiveash at sun.com
Mon Jun 5 17:13:38 EDT 2006
I'm getting a core dump when I hit:
assert (sizeof(princ_name) >= MAXHOSTNAMELEN + 8);
in src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c.
Note:
char princ_name[MAX_PRINC_SIZE], localname[MAXHOSTNAMELEN];
and:
+35 src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.h
<global> #define MAX_PRINC_SIZE 256
+475 /usr/include/netdb.h
<global> #define MAXHOSTNAMELEN 256
so the assert() always fails. Seems like there is a better way to
allocate a buffer large enough to handle princ names with hostnames.
Another issue; just after the assert() I see:
snprintf(princ_name, sizeof(princ_name), "kadmin/%s@%s", hp->h_name, global_params.realm);
Isn't this presumptuous in regards to the hostname used when doing this
on a multi-homed system?
--
Will Fiveash
Sun Microsystems Inc.
Austin, TX, USA (TZ=CST6CDT)
More information about the krbdev
mailing list