Kill the >kill command

FTL now hosts the DNS server for the network, so allowing anyone to kill
it is a security issue.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-10-04 15:54:38 -04:00
parent 7a74accc8d
commit d2d24acfdf
2 changed files with 1 additions and 12 deletions
-7
View File
@@ -138,13 +138,6 @@ void process_request(char *client_message, int *sock)
close(*sock);
*sock = 0;
}
else if(command(client_message, ">kill"))
{
processed = true;
ssend(*sock, "killed\n");
logg("FTL killed by client ID: %i",*sock);
killed = 1;
}
if(!processed)
{
+1 -5
View File
@@ -249,9 +249,5 @@ load 'libs/bats-support/load'
}
@test "Final part of the tests: Killing pihole-FTL process" {
run bash -c 'echo ">kill" | nc -v 127.0.0.1 4711'
echo "output: ${lines[@]}"
[[ ${lines[0]} == "Connection to 127.0.0.1 4711 port [tcp/*] succeeded!" ]]
[[ ${lines[1]} == "killed" ]]
[[ ${lines[2]} == "---EOM---" ]]
run bash -c 'kill $(pidof pihole-FTL)'
}