]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
sshctrl: Fix syntax of generated sed command
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 11 Apr 2019 22:22:14 +0000 (23:22 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 11 Apr 2019 22:22:14 +0000 (23:22 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/misc-progs/sshctrl.c

index 476dbc9d5481991e99e19c3612a95fcc75c66d35..f855c5a4a78818462cfbf627aabf69c76d9f88f3 100644 (file)
@@ -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/^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
                                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 );
 
                                if(findkey(kv, "SSH_AGENT_FORWARDING", buffer) && !strcmp(buffer,"on"))
                                                strlcat(command, "s/^AllowAgentForwarding .*$/AllowAgentForwarding yes/;", STRING_SIZE - 1 );