mirror of
https://github.com/troglobit/finit.git
synced 2026-10-22 11:36:07 +00:00
service_register(): guard against loss of command args
We use strtok() quite extensively in .conf parser. Parsing of a service line is split in two, with the command arguments being parsed very late. Adding a new sub-option parser, based on strtok(), risk losing command arguments. Thus, change to use strtok_r() so that we always know where the arg parser is. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
8b5435908c
commit
0e04ffd68f
3 files changed
+14
-17
No files matched your search
@@ -48,7 +48,7 @@ char *tty_canonicalize (char *dev);
|
||||
int tty_isatcon (char *dev);
|
||||
char *tty_atcon (void);
|
||||
|
||||
int tty_parse_args (char *cmdline, struct tty *tty);
|
||||
int tty_parse_args (struct tty *tty, char *cmd, char **args);
|
||||
|
||||
int tty_exists (char *dev);
|
||||
int tty_exec (svc_t *tty);
|
||||
|
||||
Reference in new issue
Block a user