diff options
Diffstat (limited to 'src/firejail/checkcfg.c')
-rw-r--r-- | src/firejail/checkcfg.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/firejail/checkcfg.c b/src/firejail/checkcfg.c index bf85436c3..a69c2831e 100644 --- a/src/firejail/checkcfg.c +++ b/src/firejail/checkcfg.c | |||
@@ -25,6 +25,7 @@ | |||
25 | static int initialized = 0; | 25 | static int initialized = 0; |
26 | static int cfg_val[CFG_MAX]; | 26 | static int cfg_val[CFG_MAX]; |
27 | char *xephyr_screen = "800x600"; | 27 | char *xephyr_screen = "800x600"; |
28 | char *xephyr_extra_params = ""; | ||
28 | 29 | ||
29 | int checkcfg(int val) { | 30 | int checkcfg(int val) { |
30 | EUID_ASSERT(); | 31 | EUID_ASSERT(); |
@@ -165,9 +166,27 @@ int checkcfg(int val) { | |||
165 | if (asprintf(&xephyr_screen, "%dx%d", n1, n2) == -1) | 166 | if (asprintf(&xephyr_screen, "%dx%d", n1, n2) == -1) |
166 | errExit("asprintf"); | 167 | errExit("asprintf"); |
167 | } | 168 | } |
169 | |||
170 | // xephyr window title | ||
171 | else if (strncmp(ptr, "xephyr-window-title ", 20) == 0) { | ||
172 | if (strcmp(ptr + 20, "yes") == 0) | ||
173 | cfg_val[CFG_XEPHYR_WINDOW_TITLE] = 1; | ||
174 | else if (strcmp(ptr + 20, "no") == 0) | ||
175 | cfg_val[CFG_XEPHYR_WINDOW_TITLE] = 0; | ||
176 | else | ||
177 | goto errout; | ||
178 | } | ||
179 | |||
180 | // Xephyr command extra parameters | ||
181 | else if (strncmp(ptr, "xephyr-extra-params ", 19) == 0) { | ||
182 | xephyr_extra_params = strdup(ptr + 19); | ||
183 | if (!xephyr_extra_params) | ||
184 | errExit("strdup"); | ||
185 | } | ||
186 | |||
168 | else | 187 | else |
169 | goto errout; | 188 | goto errout; |
170 | 189 | ||
171 | free(ptr); | 190 | free(ptr); |
172 | } | 191 | } |
173 | 192 | ||