diff options
| author | Richard Basch <probe@mit.edu> | 1995-10-24 23:14:56 +0000 |
|---|---|---|
| committer | Richard Basch <probe@mit.edu> | 1995-10-24 23:14:56 +0000 |
| commit | 190c7c4796fa11de1ee4ac948cc3c9f490670972 (patch) | |
| tree | e2f82abd2429667660f5c0eb775b5b7846cf3059 /src/lib | |
| parent | 622be3d0f5937f863037ee25cda76ff09fb3b19e (diff) | |
| download | krb5-190c7c4796fa11de1ee4ac948cc3c9f490670972.tar.gz krb5-190c7c4796fa11de1ee4ac948cc3c9f490670972.tar.xz krb5-190c7c4796fa11de1ee4ac948cc3c9f490670972.zip | |
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
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/os/hst_realm.c | 10 |
1 files 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; } } |
