summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Phillips <ryan@trolocsis.com>2011-03-22 17:27:21 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2011-03-22 17:27:21 (GMT)
commitcf9074b54bfb5a325ce59127b7afe1e892223a1c (patch)
treec3af401175159b2b0b77a0026208d70f7df1a4dd
parentf922154f65163bbab164ee377200b6412a367dd2 (diff)
downloadbusybox-cf9074b54bfb5a325ce59127b7afe1e892223a1c.tar.gz
busybox-cf9074b54bfb5a325ce59127b7afe1e892223a1c.tar.bz2
login: set PAM RHOST
Signed-off-by: Ryan Phillips <ryan@trolocsis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--loginutils/login.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 5eeb082..ce0d174 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -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";