From c2d9a3d452f94b53e57e06d44714dd4e8d19033c Mon Sep 17 00:00:00 2001 From: smitsohu Date: Mon, 20 Apr 2020 22:13:22 +0200 Subject: cleanup --- src/firejail/sbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/firejail/sbox.c b/src/firejail/sbox.c index e7fa267d8..97ba3b07e 100644 --- a/src/firejail/sbox.c +++ b/src/firejail/sbox.c @@ -32,6 +32,7 @@ #endif static int sbox_do_exec_v(unsigned filtermask, char * const arg[]) { + // build a new, clean environment int env_index = 0; char *new_environment[256] = { NULL }; // preserve firejail-specific env vars @@ -40,7 +41,6 @@ static int sbox_do_exec_v(unsigned filtermask, char * const arg[]) { if (asprintf(&new_environment[env_index++], "FIREJAIL_FILE_COPY_LIMIT=%s", cl) == -1) errExit("asprintf"); } - clearenv(); if (arg_quiet) // --quiet is passed as an environment variable new_environment[env_index++] = "FIREJAIL_QUIET=yes"; if (arg_debug) // --debug is passed as an environment variable -- cgit v1.2.3-54-g00ecf