From 073623772d3e76968b55c9feca9702714e339c24 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 20 Jan 2011 12:32:03 +0000 Subject: [PATCH] Do Kerberos authentication only if we got HAVE_KRB5 SVN revision: 2367 --- src/auth.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/auth.c b/src/auth.c index 008f4cc7..cb854d7e 100644 --- a/src/auth.c +++ b/src/auth.c @@ -216,8 +216,11 @@ int auth_verify_password(LOGBOOK *lbs, const char *user, const char *password, c error_str[0] = 0; getcfg(lbs->name, "Authentication", str, sizeof(str)); + +#ifdef HAVE_KRB5 if (stricmp(str, "Kerberos") == 0) return auth_verify_password_krb5(lbs, user, password, error_str, error_size); +#endif return auth_verify_password_file(lbs, user, password, error_str, error_size); } @@ -228,8 +231,11 @@ int auth_change_password(LOGBOOK *lbs, const char *user, const char *old_pwd, co error_str[0] = 0; getcfg(lbs->name, "Authentication", str, sizeof(str)); + +#ifdef HAVE_KRB5 if (stricmp(str, "Kerberos") == 0) return auth_change_password_krb5(lbs, user, old_pwd, new_pwd, error_str, error_size); +#endif return auth_change_password_file(lbs, user, old_pwd, new_pwd, error_str, error_size); -} \ No newline at end of file +}