[1198] in Kerberos-V5-bugs
krb5b4pl3: return default realm if krb.realms doesn't exist
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Sun Mar 19 20:39:56 1995
From: "Jonathan I. Kamens" <jik@cam.ov.com>
Date: Sun, 19 Mar 1995 20:43:10 -0500
To: krb5-bugs@MIT.EDU
If the /etc/krb.realms file doesn't exist, then instead of returning
an error, the function that determines the realm of a host should
return the default realm of the host, i.e., its domain.
Here's a patch.
--- lib/krb5/os/hst_realm.c 1995/03/02 02:17:48 1.2
+++ lib/krb5/os/hst_realm.c 1995/03/02 02:19:00 1.3
@@ -128,9 +128,8 @@
}
if ((trans_file = fopen(krb5_trans_file, "r")) == (FILE *) 0) {
- krb5_xfree(retrealms[0]);
- krb5_xfree(retrealms);
- return KRB5_TRANS_CANTOPEN;
+ *realmsp = retrealms;
+ return 0;
}
(void) sprintf(scanstring, "%%%ds %%%ds",
sizeof(trans_host)-1,sizeof(trans_realm)-1);