From 4a91c1a052a43a10c3ca28b2c9a0a84396ea23fc Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 7 May 1999 18:41:52 +0000 Subject: [PATCH] Return KRB5_REALM_UNKNOWN if profile_get_values returns PROF_NO_RELATION or PROF_NO_SECTION. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11425 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 6 ++++++ src/lib/krb5/os/locate_kdc.c | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index a40a80245..8a1dfed9c 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,9 @@ +Fri May 7 14:39:08 1999 Theodore Y. Ts'o + + * locate_kdc.c (krb5_locate_kdc): Return KRB5_REALM_UNKNOWN if + profile_get_values returns PROF_NO_RELATION or + PROF_NO_SECTION. + 1999-04-01 Theodore Ts'o * prompter.c (krb5_prompter_posix): Update to use new prompter diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index d8187ac3a..68d78efeb 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -72,13 +72,9 @@ krb5_locate_kdc(context, realm, addr_pp, naddrs, master_index, nmasters) code = profile_get_values(context->profile, realm_kdc_names, &hostlist); - if (code == PROF_NO_SECTION) { - krb5_xfree(host); - return KRB5_REALM_UNKNOWN; - } else if (code == PROF_NO_RELATION) { - krb5_xfree(host); - return KRB5_CONFIG_BADFORMAT; - } else if (code) { + if (code) { + if (code == PROF_NO_SECTION || code == PROF_NO_RELATION) { + code = KRB5_REALM_UNKNOWN; krb5_xfree(host); return code; } -- 2.26.2