mirror of
git://git.gnu.org.ua/pam-modules.git
synced 2025-04-26 00:19:52 +03:00
Bugfixes in pam_fshadow
* pam_fshadow/pam_fshadow.c (verify_user_acct): Don't leave the file open. (pam_sm_authenticate): If the username was changed, set the changed value in the PAM_USER item, for eventual use by subsequent modules in stack.
This commit is contained in:
parent
9f0391c84b
commit
1af3541706
1 changed files with 3 additions and 0 deletions
|
@ -334,6 +334,7 @@ verify_user_acct(const char *confdir, const char *username, char **pwd)
|
|||
if (strcmp (pw->pw_name, username) == 0)
|
||||
break;
|
||||
}
|
||||
fclose(fp);
|
||||
if (!pw) {
|
||||
_pam_log(LOG_ERR, "user %s not found in %s",
|
||||
username, filename);
|
||||
|
@ -555,6 +556,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
|||
break;
|
||||
case PAM_SUCCESS:
|
||||
_pam_log(LOG_NOTICE, "user '%s' granted access", username);
|
||||
if (username != (char *) input_username)
|
||||
pam_set_item(pamh, PAM_USER, username);
|
||||
break;
|
||||
default:
|
||||
_pam_log(LOG_NOTICE, "user '%s' failed to authenticate",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue