mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Changed Kerberos authentication to make password changed only affecting local password
This commit is contained in:
parent
838ac0185f
commit
145db25c8e
@ -630,10 +630,12 @@ int auth_change_password(LOGBOOK * lbs, const char *user, const char *old_pwd, c
|
|||||||
|
|
||||||
if (old_pwd) {} // avoid compiler warning
|
if (old_pwd) {} // avoid compiler warning
|
||||||
|
|
||||||
|
/* Disable Kerberos password change to behave the same as for LDAP
|
||||||
#ifdef HAVE_KRB5
|
#ifdef HAVE_KRB5
|
||||||
if (stristr(str, "Kerberos"))
|
if (stristr(str, "Kerberos"))
|
||||||
status = auth_change_password_krb5(lbs, user, old_pwd, new_pwd, error_str, error_size);
|
status = auth_change_password_krb5(lbs, user, old_pwd, new_pwd, error_str, error_size);
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8813,7 +8813,7 @@ void show_change_pwd_page(LOGBOOK *lbs) {
|
|||||||
if (old_pwd[0] || new_pwd[0]) {
|
if (old_pwd[0] || new_pwd[0]) {
|
||||||
if (user[0]) {
|
if (user[0]) {
|
||||||
|
|
||||||
if (stristr(auth, "Kerberos") || stristr(auth, "Webserver") || stristr(auth, "PAM")) {
|
if (stristr(auth, "Webserver") || stristr(auth, "PAM")) {
|
||||||
if (strcmp(new_pwd, new_pwd2) != 0)
|
if (strcmp(new_pwd, new_pwd2) != 0)
|
||||||
wrong_pwd = 2;
|
wrong_pwd = 2;
|
||||||
} else {
|
} else {
|
||||||
@ -13883,7 +13883,7 @@ void show_config_page(LOGBOOK *lbs) {
|
|||||||
getcfg(lbs->name, "Authentication", auth, sizeof(auth));
|
getcfg(lbs->name, "Authentication", auth, sizeof(auth));
|
||||||
|
|
||||||
strencode2(str, user, sizeof(str));
|
strencode2(str, user, sizeof(str));
|
||||||
if (stristr(auth, "Kerberos") || stristr(auth, "Webserver") || stristr(auth, "PAM"))
|
if (stristr(auth, "Webserver") || stristr(auth, "PAM"))
|
||||||
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\" readonly></td></tr>\n", str);
|
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\" readonly></td></tr>\n", str);
|
||||||
else
|
else
|
||||||
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\"></td></tr>\n", str);
|
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\"></td></tr>\n", str);
|
||||||
@ -14209,7 +14209,7 @@ void show_forgot_pwd_page(LOGBOOK *lbs) {
|
|||||||
/*---- header ----*/
|
/*---- header ----*/
|
||||||
|
|
||||||
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||||
if (stristr(str, "Kerberos") || stristr(str, "Webserver") || stristr(str, "PAM")) {
|
if (stristr(str, "Webserver") || stristr(str, "PAM")) {
|
||||||
show_error
|
show_error
|
||||||
("This installation of ELOG uses site authentication\nwhere password recovery is not possible");
|
("This installation of ELOG uses site authentication\nwhere password recovery is not possible");
|
||||||
return;
|
return;
|
||||||
@ -14277,7 +14277,7 @@ void show_new_user_page(LOGBOOK *lbs, char *user) {
|
|||||||
rsprintf("<tr><td nowrap>Email:</td>\n");
|
rsprintf("<tr><td nowrap>Email:</td>\n");
|
||||||
rsprintf("<td colspan=2><input type=text size=40 name=new_user_email></tr>\n");
|
rsprintf("<td colspan=2><input type=text size=40 name=new_user_email></tr>\n");
|
||||||
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||||
if (!stristr(str, "Kerberos") && !stristr(str, "Webserver") && !stristr(str, "PAM")) {
|
if (!stristr(str, "Webserver") && !stristr(str, "PAM")) {
|
||||||
rsprintf("<tr><td nowrap>%s:</td>\n", loc("Password"));
|
rsprintf("<tr><td nowrap>%s:</td>\n", loc("Password"));
|
||||||
rsprintf("<td colspan=2><input type=password size=40 name=newpwd>\n");
|
rsprintf("<td colspan=2><input type=password size=40 name=newpwd>\n");
|
||||||
|
|
||||||
@ -29924,7 +29924,7 @@ void server_loop(void) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAVE_LDAP
|
#ifndef HAVE_LDAP
|
||||||
/* check for Kerberos authentication */
|
/* check for LDAP authentication */
|
||||||
/* NPA change */
|
/* NPA change */
|
||||||
getcfg("global", "Authentication", str, sizeof(str));
|
getcfg("global", "Authentication", str, sizeof(str));
|
||||||
if (stristr(str, "LDAP")) {
|
if (stristr(str, "LDAP")) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user