From: Theodore Tso Date: Sat, 17 Feb 1996 05:07:06 +0000 (+0000) Subject: If the configuration file does not exist (context->profile == NULL) X-Git-Tag: krb5-1.0-beta6~505 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e479e74c3b1a9d78e86a461a89b27a3c17ddb9d4;p=krb5.git If the configuration file does not exist (context->profile == NULL) return KRB5_CONFIG_CANTOPEN; if the default realm is not defined in the configuration file, return an error message saying so. These changes just make the diagnostic error messages more clear. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7486 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index c07b3609f..97e266600 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,12 @@ +Sat Feb 17 00:05:38 1996 Theodore Y. Ts'o + + * def_realm.c (krb5_get_default_realm): If the configuration file + does not exist (context->profile == NULL) return + KRB5_CONFIG_CANTOPEN; if the default realm is not defined + in the configuration file, return an error message saying + so. These changes just make the diagnostic error + messages more clear. + Thu Jan 11 18:32:54 1996 Ezra Peisach (epeisach@paris) * Makefile.in (check-unix): Ultrix test does not support -x. diff --git a/src/lib/krb5/os/def_realm.c b/src/lib/krb5/os/def_realm.c index 06c27fafc..053a604be 100644 --- a/src/lib/krb5/os/def_realm.c +++ b/src/lib/krb5/os/def_realm.c @@ -62,13 +62,13 @@ krb5_get_default_realm(context, lrealm) * on the host's DNS domain. */ context->default_realm = 0; + if (context->profile == 0) + return KRB5_CONFIG_CANTOPEN; retval = profile_get_string(context->profile, "libdefaults", "default_realm", 0, 0, &context->default_realm); - if (retval == PROF_NO_PROFILE) - return KRB5_CONFIG_CANTOPEN; if (context->default_realm == 0) - return(KRB5_CONFIG_BADFORMAT); + return(KRB5_CONFIG_NODEFREALM); } realm = context->default_realm;