diff options
author | 2021-09-22 20:11:53 +0200 | |
---|---|---|
committer | 2021-09-22 20:11:53 +0200 | |
commit | 7a1dd38c5155bf833e62a55aab56450b8377db75 (patch) | |
tree | 111d401087c69bad305f0904ba200d2e360249c8 /src | |
parent | Merge pull request #4533 from smitsohu/exitcode (diff) | |
download | firejail-7a1dd38c5155bf833e62a55aab56450b8377db75.tar.gz firejail-7a1dd38c5155bf833e62a55aab56450b8377db75.tar.zst firejail-7a1dd38c5155bf833e62a55aab56450b8377db75.zip |
hardcode PATH for internal use
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/env.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/firejail/env.c b/src/firejail/env.c index f5e9dd980..ad16de037 100644 --- a/src/firejail/env.c +++ b/src/firejail/env.c | |||
@@ -262,7 +262,7 @@ static const char * const env_whitelist[] = { | |||
262 | "LANG", | 262 | "LANG", |
263 | "LANGUAGE", | 263 | "LANGUAGE", |
264 | "LC_MESSAGES", | 264 | "LC_MESSAGES", |
265 | "PATH", | 265 | // "PATH", |
266 | "DISPLAY" // required by X11 | 266 | "DISPLAY" // required by X11 |
267 | }; | 267 | }; |
268 | 268 | ||
@@ -311,6 +311,10 @@ void env_apply_whitelist(void) { | |||
311 | errExit("clearenv"); | 311 | errExit("clearenv"); |
312 | 312 | ||
313 | env_apply_list(env_whitelist, ARRAY_SIZE(env_whitelist)); | 313 | env_apply_list(env_whitelist, ARRAY_SIZE(env_whitelist)); |
314 | |||
315 | // hardcoding PATH | ||
316 | if (setenv("PATH", "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin", 1) < 0) | ||
317 | errExit("setenv"); | ||
314 | } | 318 | } |
315 | 319 | ||
316 | // Filter env variables for a sbox app | 320 | // Filter env variables for a sbox app |