diff options
-rw-r--r-- | libsandbox/libsandbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c index 962690e..c126aa1 100644 --- a/libsandbox/libsandbox.c +++ b/libsandbox/libsandbox.c @@ -1201,7 +1201,7 @@ char **sb_check_envp(char **envp, size_t *mod_cnt, bool insert) if (mod_cnt) { str_list_for_each_item(envp, entry, count) { for (i = 0; i < num_vars; ++i) - if (is_env_var(entry, vars[i].name, vars[i].len)) { + if (i != 12 && is_env_var(entry, vars[i].name, vars[i].len)) { (*mod_cnt)++; goto skip; } @@ -1210,7 +1210,7 @@ char **sb_check_envp(char **envp, size_t *mod_cnt, bool insert) } } else { for (i = 0; i < num_vars; ++i) - unsetenv(vars[i].name); + if (i != 12) unsetenv(vars[i].name); } } else { if (mod_cnt) { |