mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Treat PAM login like Kerberos or Webserver login.
This commit is contained in:
parent
c21421dbec
commit
c2133ddffd
@ -9002,7 +9002,7 @@ void show_change_pwd_page(LOGBOOK * lbs)
|
||||
if (old_pwd[0] || new_pwd[0]) {
|
||||
if (user[0]) {
|
||||
|
||||
if (stristr(auth, "Kerberos") || stristr(auth, "Webserver")) {
|
||||
if (stristr(auth, "Kerberos") || stristr(auth, "Webserver") || stristr(auth, "PAM") ) {
|
||||
if (strcmp(new_pwd, new_pwd2) != 0)
|
||||
wrong_pwd = 2;
|
||||
} else {
|
||||
@ -13985,7 +13985,7 @@ void show_config_page(LOGBOOK * lbs)
|
||||
getcfg(lbs->name, "Authentication", auth, sizeof(auth));
|
||||
|
||||
strencode2(str, user, sizeof(str));
|
||||
if (stristr(auth, "Kerberos") || stristr(auth, "Webserver"))
|
||||
if (stristr(auth, "Kerberos") || stristr(auth, "Webserver") || stristr(auth, "PAM"))
|
||||
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\" readonly></td></tr>\n", str);
|
||||
else
|
||||
rsprintf("<td><input type=text size=40 name=new_user_name value=\"%s\"></td></tr>\n", str);
|
||||
@ -14319,7 +14319,7 @@ void show_forgot_pwd_page(LOGBOOK * lbs)
|
||||
/*---- header ----*/
|
||||
|
||||
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||
if (stristr(str, "Kerberos")|| stristr(str, "Webserver")) {
|
||||
if (stristr(str, "Kerberos")|| stristr(str, "Webserver") || stristr(str, "PAM")) {
|
||||
show_error
|
||||
("This installation of ELOG uses site authentication\nwhere password recovery is not possible");
|
||||
return;
|
||||
@ -14388,7 +14388,7 @@ void show_new_user_page(LOGBOOK * lbs, char *user)
|
||||
rsprintf("<tr><td nowrap>Email:</td>\n");
|
||||
rsprintf("<td colspan=2><input type=text size=40 name=new_user_email></tr>\n");
|
||||
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||
if (!stristr(str, "Kerberos") && !stristr(str, "Webserver")) {
|
||||
if (!stristr(str, "Kerberos") && !stristr(str, "Webserver") && !stristr(str, "PAM")) {
|
||||
rsprintf("<tr><td nowrap>%s:</td>\n", loc("Password"));
|
||||
rsprintf("<td colspan=2><input type=password size=40 name=newpwd>\n");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user