From a9e4a303da511768c7c182628fd8a9974381747b Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 10 Jun 1994 20:06:43 +0000 Subject: [PATCH] fall back on realm name as a default domain name git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3732 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/realm_dom.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/realm_dom.c b/src/lib/krb5/os/realm_dom.c index e7142b1d9..42f93ce3a 100644 --- a/src/lib/krb5/os/realm_dom.c +++ b/src/lib/krb5/os/realm_dom.c @@ -98,7 +98,12 @@ krb5_get_realm_domain(realm, domain) krb5_xfree(realmlist[0]); krb5_xfree(realmlist); } - *domain = NULL; + if ((retdomain = malloc(strlen(realm) + 2)) == NULL) + return ENOMEM; + strcpy(retdomain, "."); + strcat(retdomain, realm); /* return the realm as the domain + if lookup fails */ + *domain = retdomain; return 0; } continue; -- 2.26.2