From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sandbox:master commit in: tests/, libsbutil/
Date: Fri, 11 Sep 2015 07:53:28 +0000 (UTC) [thread overview]
Message-ID: <1362307123.13a9a7d17d80b9dae0543e54167d4bca7656e48b.vapier@gentoo> (raw)
commit: 13a9a7d17d80b9dae0543e54167d4bca7656e48b
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 3 10:38:43 2013 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Mar 3 10:38:43 2013 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=13a9a7d1
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 <AT> gentoo.org>
libsbutil/sbutil.h | 2 +-
tests/script-10.sh | 2 +-
2 files changed, 2 insertions(+), 2 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"
diff --git a/tests/script-10.sh b/tests/script-10.sh
index 801730e..aa62b01 100755
--- a/tests/script-10.sh
+++ b/tests/script-10.sh
@@ -5,7 +5,7 @@
ret=0
out=$(env -i env)
-for var in LOG DEBUG_LOG MESSAGE_PATH DENY READ WRITE PREDICT ON ACTIVE ; do
+for var in LOG DEBUG_LOG MESSAGE_P@TH DENY READ WRITE PREDICT ON ACTIVE ; do
var="SANDBOX_${var}"
oval=$(env | grep "^${var}=" | sed 's:^[^=]*=::')
reply other threads:[~2015-09-11 7:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362307123.13a9a7d17d80b9dae0543e54167d4bca7656e48b.vapier@gentoo \
--to=vapier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox