aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-03-03 05:38:43 -0500
committerMike Frysinger <vapier@gentoo.org>2013-03-03 05:38:43 -0500
commit13a9a7d17d80b9dae0543e54167d4bca7656e48b (patch)
tree5b6a7a569f7304bdf5bef241b6029e3b09c575e7 /libsbutil
parentsandbox: accept SANDBOX_LOG vars whatever their values (diff)
downloadsandbox-13a9a7d17d80b9dae0543e54167d4bca7656e48b.tar.gz
sandbox-13a9a7d17d80b9dae0543e54167d4bca7656e48b.tar.bz2
sandbox-13a9a7d17d80b9dae0543e54167d4bca7656e48b.zip
sandbox: use a non-shell var for the message path
By allowing the SANDBOX_MESSAGE_PATH var to be stored in the shell environment and then modified on the fly, we run into a fun edge case with the PM. When a phase has finished running, it saves the current environment. When the next phase runs, it loads the env from the previous run. Since the message path var can contain a pid, the previous run will no longer be valid. Since we want this to simply be a way for the active sandbox to pass information to the active libsandbox.so's, there's no need to use an env var that the shell can save/reload. As such, use a variable name that the shell will skip. Non-shell programs have no problem with this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsbutil')
-rw-r--r--libsbutil/sbutil.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsbutil/sbutil.h b/libsbutil/sbutil.h
index 479734b..c76465f 100644
--- a/libsbutil/sbutil.h
+++ b/libsbutil/sbutil.h
@@ -46,7 +46,7 @@
#define ENV_SANDBOX_BASHRC "SANDBOX_BASHRC"
#define ENV_SANDBOX_LOG "SANDBOX_LOG"
#define ENV_SANDBOX_DEBUG_LOG "SANDBOX_DEBUG_LOG"
-#define ENV_SANDBOX_MESSAGE_PATH "SANDBOX_MESSAGE_PATH"
+#define ENV_SANDBOX_MESSAGE_PATH "SANDBOX_MESSAGE_P@TH" /* @ is not a typo */
#define ENV_SANDBOX_WORKDIR "SANDBOX_WORKDIR"
#define ENV_SANDBOX_DENY "SANDBOX_DENY"