Do Kerberos authentication only if we got HAVE_KRB5

SVN revision: 2367
This commit is contained in:
Stefan Ritt 2011-01-20 12:32:03 +00:00
parent 119c411b9c
commit 073623772d

View File

@ -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);
}
}