diff options
author | 2016-07-05 07:29:32 -0400 | |
---|---|---|
committer | 2016-07-05 07:29:32 -0400 | |
commit | 24665f112ddac31f22eb80382381d74865c1cc9d (patch) | |
tree | a3d191d838c049ca1d17d7e20b9e2f20fe91360a | |
parent | Merge pull request #614 from Fred-Barclay/telegram (diff) | |
parent | Fix improper quoting of arguments (diff) | |
download | firejail-24665f112ddac31f22eb80382381d74865c1cc9d.tar.gz firejail-24665f112ddac31f22eb80382381d74865c1cc9d.tar.zst firejail-24665f112ddac31f22eb80382381d74865c1cc9d.zip |
Merge pull request #613 from manevich/manevich-fix-quoting-1
Fix improper quoting of arguments
-rw-r--r-- | src/firejail/join.c | 4 | ||||
-rw-r--r-- | src/firejail/main.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/firejail/join.c b/src/firejail/join.c index aba8f064b..47d31669d 100644 --- a/src/firejail/join.c +++ b/src/firejail/join.c | |||
@@ -62,9 +62,9 @@ static void extract_command(int argc, char **argv, int index) { | |||
62 | *cfg.command_line = '\0'; | 62 | *cfg.command_line = '\0'; |
63 | for (i = index; i < argc; i++) { | 63 | for (i = index; i < argc; i++) { |
64 | if (strchr(argv[i], '&')) { | 64 | if (strchr(argv[i], '&')) { |
65 | strcat(cfg.command_line, "\""); | 65 | strcat(cfg.command_line, "\'"); |
66 | strcat(cfg.command_line, argv[i]); | 66 | strcat(cfg.command_line, argv[i]); |
67 | strcat(cfg.command_line, "\" "); | 67 | strcat(cfg.command_line, "\' "); |
68 | } | 68 | } |
69 | else { | 69 | else { |
70 | strcat(cfg.command_line, argv[i]); | 70 | strcat(cfg.command_line, argv[i]); |
diff --git a/src/firejail/main.c b/src/firejail/main.c index 6faec9109..7b956bf64 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -2005,7 +2005,7 @@ int main(int argc, char **argv) { | |||
2005 | sprintf(ptr1, "%s ", argv[i + prog_index]); | 2005 | sprintf(ptr1, "%s ", argv[i + prog_index]); |
2006 | } | 2006 | } |
2007 | else { | 2007 | else { |
2008 | sprintf(ptr1, "\"%s\" ", argv[i + prog_index]); | 2008 | sprintf(ptr1, "\'%s\' ", argv[i + prog_index]); |
2009 | } | 2009 | } |
2010 | sprintf(ptr2, "%s ", argv[i + prog_index]); | 2010 | sprintf(ptr2, "%s ", argv[i + prog_index]); |
2011 | 2011 | ||