changeset 1425:39aaf9f4d576

set PAM_RHOST
author Matt Johnston <matt@ucc.asn.au>
date Fri, 23 Jun 2017 23:21:20 +0800
parents 8a4b8f026de6
children 89f8c5960527
files svr-authpam.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/svr-authpam.c	Fri May 26 00:19:53 2017 +0800
+++ b/svr-authpam.c	Fri Jun 23 23:21:20 2017 +0800
@@ -224,6 +224,12 @@
 		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 */);