From 834a66e344a004cfdae399b8d3579b5ad7250ea7 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 16 Apr 1999 00:19:31 +0000 Subject: [PATCH] * g_cnffile.c (krb__get_srvtabname): Fix to actually extract krb5_srvtab value from profile, instead of always ignoring it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11363 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 5 +++++ src/lib/krb4/g_cnffile.c | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 13b13338d..64601398a 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,8 @@ +Thu Apr 15 20:18:38 1999 Tom Yu + + * g_cnffile.c (krb__get_srvtabname): Fix to actually extract + krb5_srvtab value from profile, instead of always ignoring it. + Mon Feb 8 21:56:45 1999 Theodore Y. Ts'o * rd_req.c (krb_rd_req): Add appropriate #ifdef so that this code diff --git a/src/lib/krb4/g_cnffile.c b/src/lib/krb4/g_cnffile.c index c50cd50e4..9b7b07052 100644 --- a/src/lib/krb4/g_cnffile.c +++ b/src/lib/krb4/g_cnffile.c @@ -62,17 +62,18 @@ krb__get_srvtabname(default_srvtabname) names[0] = "libdefaults"; names[1] = "krb4_srvtab"; names[2] = 0; - if (krb5__krb4_context && - (retval = profile_get_values(krb5__krb4_context->profile, names, - &full_name)) - && retval == 0 && full_name && full_name[0]) { - retname = strdup(full_name[0]); - for (cpp = full_name; *cpp; cpp++) - krb5_xfree(*cpp); - krb5_xfree(full_name); - }else { - retname = strdup(default_srvtabname); + if (krb5__krb4_context) { + retval = profile_get_values(krb5__krb4_context->profile, names, + &full_name); + if (retval == 0 && full_name && full_name[0]) { + retname = strdup(full_name[0]); + for (cpp = full_name; *cpp; cpp++) + krb5_xfree(*cpp); + krb5_xfree(full_name); + return retname; + } } + retname = strdup(default_srvtabname); return retname; } -- 2.26.2