mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 12:15:52 +02:00
misc-progs: sshctrl: Sanitise runtime for "tempstart"
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -133,6 +133,11 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
else if (strcmp(argv[1], "tempstart") == 0) {
|
||||
if (!is_valid_argument_num(argv[2])) {
|
||||
fprintf(stderr, "Invalid time '%s'\n", argv[2]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
safe_system("/usr/local/bin/sshctrl");
|
||||
sleep(5);
|
||||
unlink("/var/ipfire/remote/enablessh");
|
||||
|
||||
Reference in New Issue
Block a user