version 1.390, 2019/05/03 04:11:00 |
version 1.391, 2019/05/10 18:55:17 |
|
|
{ |
{ |
if (!check_rfwd_permission(ssh, fwd)) { |
if (!check_rfwd_permission(ssh, fwd)) { |
ssh_packet_send_debug(ssh, "port forwarding refused"); |
ssh_packet_send_debug(ssh, "port forwarding refused"); |
|
if (fwd->listen_path != NULL) |
|
/* XXX always allowed, see remote_open_match() */ |
|
logit("Received request from %.100s port %d to " |
|
"remote forward to path \"%.100s\", " |
|
"but the request was denied.", |
|
ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), |
|
fwd->listen_path); |
|
else if(fwd->listen_host != NULL) |
|
logit("Received request from %.100s port %d to " |
|
"remote forward to host %.100s port %d, " |
|
"but the request was denied.", |
|
ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), |
|
fwd->listen_host, fwd->listen_port ); |
|
else |
|
logit("Received request from %.100s port %d to remote " |
|
"forward, but the request was denied.", |
|
ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); |
return 0; |
return 0; |
} |
} |
if (fwd->listen_path != NULL) { |
if (fwd->listen_path != NULL) { |
|
|
} |
} |
|
|
if (!permit || !permit_adm) { |
if (!permit || !permit_adm) { |
logit("Received request to connect to host %.100s port %d, " |
logit("Received request from %.100s port %d to connect to " |
"but the request was denied.", host, port); |
"host %.100s port %d, but the request was denied.", |
|
ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), host, port); |
if (reason != NULL) |
if (reason != NULL) |
*reason = SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED; |
*reason = SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED; |
return NULL; |
return NULL; |