[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segfault lurking in ktutil's krb5_principal_get_realm()?
Harald Barth <haba@pdc.kth.se> writes:
> Heimdal 0.6 on Solaris x86 5.9 might segfault when the reverse lookup of
> your own IP gives you a hostname without domain part:
The backtrace kind of make sense for the crash, but at the same time I
can't figure out why krb5_parse_name() would fail.
Love
2004-06-09 Love Hörnquist Åstrand <lha@it.su.se>
* admin/get.c (kt_get): catch errors from krb5_parse_name
diff -u -u -w -r1.22 -r1.23
--- get.c 16 Jan 2003 19:03:23 -0000
+++ get.c 9 Jun 2004 10:44:55 -0000
@@ -170,6 +170,10 @@
krb5_keytab_entry entry;
ret = krb5_parse_name(context, argv[i], &princ_ent);
+ if (ret) {
+ krb5_warn(context, ret, "can't parse principal %s", argv[i]);
+ continue;
+ }
memset(&princ, 0, sizeof(princ));
princ.principal = princ_ent;
mask |= KADM5_PRINCIPAL;
PGP signature