mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Change empty password file logic in case of PAM authentication.
This commit is contained in:
parent
2dedd2addc
commit
d0ddbab545
@ -26457,6 +26457,10 @@ BOOL check_login(LOGBOOK * lbs, char *sid)
|
|||||||
char str[1000], pwd_file[256], user_name[256], upwd[256];
|
char str[1000], pwd_file[256], user_name[256], upwd[256];
|
||||||
int status, inactive, skip_sid_check;
|
int status, inactive, skip_sid_check;
|
||||||
|
|
||||||
|
#ifdef HAVE_PAM
|
||||||
|
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||||
|
if (!stristr(str, "PAM")) {
|
||||||
|
#endif /* HAVE_PAM */
|
||||||
/* show new user screen if password file is empty */
|
/* show new user screen if password file is empty */
|
||||||
if (!enum_user_line(lbs, 0, str, sizeof(str))) {
|
if (!enum_user_line(lbs, 0, str, sizeof(str))) {
|
||||||
if (isparam("new_user_name"))
|
if (isparam("new_user_name"))
|
||||||
@ -26469,6 +26473,9 @@ BOOL check_login(LOGBOOK * lbs, char *sid)
|
|||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_PAM
|
||||||
|
}
|
||||||
|
#endif /* HAVE_PAM */
|
||||||
|
|
||||||
/* check for "forgot password" */
|
/* check for "forgot password" */
|
||||||
if (isparam("cmd") && strcmp(getparam("cmd"), loc("Forgot")) == 0) {
|
if (isparam("cmd") && strcmp(getparam("cmd"), loc("Forgot")) == 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user