diff options
author | 2017-03-24 17:59:01 -0400 | |
---|---|---|
committer | 2017-03-24 17:59:01 -0400 | |
commit | 51400e245d453d9b45d984d323a2a5f86567480f (patch) | |
tree | bf37143a1b5652ab689559c80903282da4c47145 /src | |
parent | testing (diff) | |
download | firejail-51400e245d453d9b45d984d323a2a5f86567480f.tar.gz firejail-51400e245d453d9b45d984d323a2a5f86567480f.tar.zst firejail-51400e245d453d9b45d984d323a2a5f86567480f.zip |
testing
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/cmdline.c | 10 | ||||
-rw-r--r-- | src/firejail/sandbox.c | 8 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/firejail/cmdline.c b/src/firejail/cmdline.c index 60301ed58..e62ed8d33 100644 --- a/src/firejail/cmdline.c +++ b/src/firejail/cmdline.c | |||
@@ -153,6 +153,9 @@ void build_cmdline(char **command_line, char **window_title, int argc, char **ar | |||
153 | errExit("malloc"); | 153 | errExit("malloc"); |
154 | 154 | ||
155 | quote_cmdline(*command_line, *window_title, len, argc, argv, index); | 155 | quote_cmdline(*command_line, *window_title, len, argc, argv, index); |
156 | |||
157 | if (arg_debug) | ||
158 | printf("Building quoted command line: %s\n", *command_line); | ||
156 | 159 | ||
157 | assert(*command_line); | 160 | assert(*command_line); |
158 | assert(*window_title); | 161 | assert(*window_title); |
@@ -163,7 +166,9 @@ void build_appimage_cmdline(char **command_line, char **window_title, int argc, | |||
163 | // the program should exit with an error before entering this function | 166 | // the program should exit with an error before entering this function |
164 | assert(index != -1); | 167 | assert(index != -1); |
165 | 168 | ||
166 | // unsigned argcount = argc - index; | 169 | if (arg_debug) |
170 | printf("Building AppImage command line: %s\n", *command_line); | ||
171 | |||
167 | 172 | ||
168 | int len1 = cmdline_length(argc, argv, index); // length of argv w/o changes | 173 | int len1 = cmdline_length(argc, argv, index); // length of argv w/o changes |
169 | int len2 = cmdline_length(1, &argv[index], 0); // apptest.AppImage | 174 | int len2 = cmdline_length(1, &argv[index], 0); // apptest.AppImage |
@@ -198,6 +203,9 @@ void build_appimage_cmdline(char **command_line, char **window_title, int argc, | |||
198 | if (asprintf(command_line, "'%s' %s", tmp1, command_line_tmp + len2) == -1) | 203 | if (asprintf(command_line, "'%s' %s", tmp1, command_line_tmp + len2) == -1) |
199 | errExit("asprintf"); | 204 | errExit("asprintf"); |
200 | 205 | ||
206 | if (arg_debug) | ||
207 | printf("AppImage quoted command line: %s\n", *command_line); | ||
208 | |||
201 | // free strdup | 209 | // free strdup |
202 | free(tmp1); | 210 | free(tmp1); |
203 | } | 211 | } |
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index d1557e8b2..f9e59f1ed 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -865,6 +865,14 @@ int sandbox(void* sandbox_arg) { | |||
865 | } | 865 | } |
866 | } | 866 | } |
867 | } | 867 | } |
868 | if (arg_debug) { | ||
869 | char *cpath = get_current_dir_name(); | ||
870 | if (cpath) { | ||
871 | printf("Current directory: %s\n", cpath); | ||
872 | free(cpath); | ||
873 | } | ||
874 | } | ||
875 | |||
868 | 876 | ||
869 | // set nice | 877 | // set nice |
870 | if (arg_nice) { | 878 | if (arg_nice) { |