mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
sshctrl: Fix syntax of generated sed command
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -72,9 +72,9 @@ int main(int argc, char *argv[])
|
||||
strlcat(command, "s/^AllowTcpForwarding .*$/AllowTcpForwarding no/;", STRING_SIZE - 1 );
|
||||
|
||||
if(findkey(kv, "SSH_PORT", buffer) && !strcmp(buffer,"on"))
|
||||
strlcat(command, "s/^Port .*$/Port 22/", STRING_SIZE - 1 );
|
||||
strlcat(command, "s/^Port .*$/Port 22/;", STRING_SIZE - 1 );
|
||||
else
|
||||
strlcat(command, "s/^Port .*$/Port 222/", STRING_SIZE - 1 );
|
||||
strlcat(command, "s/^Port .*$/Port 222/;", STRING_SIZE - 1 );
|
||||
|
||||
if(findkey(kv, "SSH_AGENT_FORWARDING", buffer) && !strcmp(buffer,"on"))
|
||||
strlcat(command, "s/^AllowAgentForwarding .*$/AllowAgentForwarding yes/;", STRING_SIZE - 1 );
|
||||
|
||||
Reference in New Issue
Block a user