This allows pam modules to restrict users by host. For
instance, you could restrict root@pam to only 127.0.0.1.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
die "error during PAM init: $err";
}
die "error during PAM init: $err";
}
+ if (my $rpcenv = PVE::RPCEnvironment::get()) {
+ if (my $ip = $rpcenv->get_client_ip()) {
+ $pamh->pam_set_item(PAM_RHOST(), $ip);
+ }
+ }
+
my $res;
if (($res = $pamh->pam_authenticate(0)) != PAM_SUCCESS) {
my $res;
if (($res = $pamh->pam_authenticate(0)) != PAM_SUCCESS) {