mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
pam_systemd_home: export password as PAM_AUTHTOK
This commit is contained in:
parent
567fe1d570
commit
d2e545f88e
@ -625,6 +625,15 @@ static int acquire_home(
|
||||
do_auth = true;
|
||||
}
|
||||
|
||||
/* Later PAM modules may need the auth token, but only during pam_authenticate. */
|
||||
if (please_authenticate && !strv_isempty(secret->password)) {
|
||||
r = pam_set_item(handle, PAM_AUTHTOK, *secret->password);
|
||||
if (r < 0) {
|
||||
pam_syslog(handle, LOG_ERR, "Failed to set PAM auth token: %s", pam_strerror(handle, r));
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
r = pam_set_data(handle, fd_field, FD_TO_PTR(acquired_fd), cleanup_home_fd);
|
||||
if (r < 0) {
|
||||
pam_syslog(handle, LOG_ERR, "Failed to set PAM bus data: %s", pam_strerror(handle, r));
|
||||
|
Loading…
Reference in New Issue
Block a user