summaryrefslogtreecommitdiffhomepage
path: root/svr-authpam.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-06-23 23:21:20 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-06-23 23:21:20 +0800
commit3c5ed47804e72793cd1bdfc8796b021ceae6e6a2 (patch)
tree84711e208599c2b26126285afcf33d0df51b976f /svr-authpam.c
parent924b8469cbd4e2884736f226f3c591c6d0e359a0 (diff)
set PAM_RHOST
Diffstat (limited to 'svr-authpam.c')
-rw-r--r--svr-authpam.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/svr-authpam.c b/svr-authpam.c
index ac8e5ec..05e4f3e 100644
--- a/svr-authpam.c
+++ b/svr-authpam.c
@@ -224,6 +224,12 @@ void svr_auth_pam() {
goto cleanup;
}
+ if ((rc = pam_set_item(pamHandlep, PAM_RHOST, svr_ses.remotehost)) != PAM_SUCCESS) {
+ dropbear_log(LOG_WARNING, "pam_set_item() failed, rc=%d, %s",
+ rc, pam_strerror(pamHandlep, rc));
+ goto cleanup;
+ }
+
#ifdef HAVE_PAM_FAIL_DELAY
/* We have our own random delay code already, disable PAM's */
(void) pam_fail_delay(pamHandlep, 0 /* musec_delay */);