login: set PAM RHOST
Signed-off-by: Ryan Phillips <ryan@trolocsis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
f922154f65
commit
cf9074b54b
@ -278,6 +278,14 @@ int login_main(int argc UNUSED_PARAM, char **argv)
|
||||
failed_msg = "set_item(TTY)";
|
||||
goto pam_auth_failed;
|
||||
}
|
||||
/* set RHOST */
|
||||
if (opt_host) {
|
||||
pamret = pam_set_item(pamh, PAM_RHOST, opt_host);
|
||||
if (pamret != PAM_SUCCESS) {
|
||||
failed_msg = "set_item(RHOST)";
|
||||
goto pam_auth_failed;
|
||||
}
|
||||
}
|
||||
pamret = pam_authenticate(pamh, 0);
|
||||
if (pamret != PAM_SUCCESS) {
|
||||
failed_msg = "authenticate";
|
||||
|
Loading…
Reference in New Issue
Block a user