aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-01 19:49:43 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-01 19:49:43 +0000
commitab00eb373afeeed2f0d90f2a4f9430d1940a1143 (patch)
tree605d402e5b4ad7cdd2cc26270d8ecac50b24aba6
parentd962c866741ce3c91ee1bb66d1b2569701ad9575 (diff)
downloadpaludis-ab00eb373afeeed2f0d90f2a4f9430d1940a1143.tar.gz
paludis-ab00eb373afeeed2f0d90f2a4f9430d1940a1143.tar.xz
Don't spawn sandbox if we're already sandboxed
-rw-r--r--paludis/util/system.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index 65a0188..b915e4f 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -137,7 +137,14 @@ const std::string
paludis::make_sandbox_command(const std::string & cmd)
{
#if HAVE_SANDBOX
- return "sandbox " + cmd;
+ if (getenv_with_default("SANDBOX_ACTIVE", "").empty())
+ {
+ Log::get_instance()->message(ll_warning, "Already inside sandbox, not spawning "
+ "another sandbox instance");
+ return cmd;
+ }
+ else
+ return "sandbox " + cmd;
#else
return cmd;
#endif