From 190c7c4796fa11de1ee4ac948cc3c9f490670972 Mon Sep 17 00:00:00 2001 From: Richard Basch Date: Tue, 24 Oct 1995 23:14:56 +0000 Subject: [PATCH] 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 --- src/lib/krb5/os/hst_realm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } } -- 2.26.2