From: Richard Basch Date: Tue, 24 Oct 1995 23:14:56 +0000 (+0000) Subject: For compatibility with older .conf files, keep the domain name check X-Git-Tag: krb5-1.0-beta6~875 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=190c7c4796fa11de1ee4ac948cc3c9f490670972;p=krb5.git For compatibility with older .conf files, keep the domain name check being done in lower case, and if necessary, convert it to upper case if the domain is being used as the default realm. In addition, there was an extra free without an associated *alloc. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6994 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/hst_realm.c b/src/lib/krb5/os/hst_realm.c index 500904700..2062928cc 100644 --- a/src/lib/krb5/os/hst_realm.c +++ b/src/lib/krb5/os/hst_realm.c @@ -117,9 +117,6 @@ krb5_get_host_realm(context, host, realmsp) 7) D */ - for (cp = local_host; *cp; cp++) - if (islower(*cp)) - *cp = toupper(*cp); cp = local_host; realm = default_realm = (char *)NULL; while (cp) { @@ -157,13 +154,18 @@ krb5_get_host_realm(context, host, realmsp) return ENOMEM; strcpy(cp, default_realm); realm = cp; + + /* Assume the realm name is upper case */ + for (cp = realm; *cp; cp++) + if (islower(*cp)) + *cp = toupper(*cp); + cp = realm; } else { /* We are defaulting to the local realm */ retval = krb5_get_default_realm(context, &cp); if (retval) { - krb5_xfree(retrealms); return retval; } }