# HG changeset patch # User Matt Johnston # Date 1498231280 -28800 # Node ID 39aaf9f4d576be2fe9828d23321d4a61496ce54c # Parent 8a4b8f026de63d6125a593d0bc34c91bec242655 set PAM_RHOST diff -r 8a4b8f026de6 -r 39aaf9f4d576 svr-authpam.c --- 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 */);