Skip to content

Commit

Permalink
clusterd: Accept commands only from trusted hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jan 29, 2025
1 parent 185c5ad commit 1deebf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clusterd/clusterd
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,12 @@ sub clp_rx_LSOF {

sub clp_rx_CMD {
my ($socket,@cmd)=@_;

unless (is_trusted_ip($socket->peerhost())) {
warn "reveived command from untrusted host ". $socket->peerhost(). "\n";
return;
}

my $pid=fork;
unless (defined $pid) {
warn"$!\n";
Expand Down

0 comments on commit 1deebf1

Please sign in to comment.