From f0815f5dff315576c8d1b6fedf00165a4161f8c0 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 4 Sep 2015 10:30:03 +0200 Subject: KRB5: Don't error out reading a minimal krb5.conf With some setups, krb5.conf can be really minimal. In those cases, we should ignore PROF_NO_RELATION and PROF_NO_SECTION and just return "false" as in "no proxy" without a loud debug message. Reviewed-by: Petr Cech --- src/util/sss_krb5.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c index e29c753e1..2d2dfc4e9 100644 --- a/src/util/sss_krb5.c +++ b/src/util/sss_krb5.c @@ -1103,7 +1103,10 @@ bool sss_krb5_realm_has_proxy(const char *realm) profile_path[1] = realm; kerr = profile_get_values(profile, profile_path, &list); - if (kerr != 0) { + if (kerr == PROF_NO_RELATION || kerr == PROF_NO_SECTION) { + kerr = 0; + goto done; + } else if (kerr != 0) { DEBUG(SSSDBG_OP_FAILURE, "profile_get_values failed.\n"); goto done; } -- cgit