aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-04-22 06:59:22 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-04-22 06:59:22 +0000
commit9a8a0b7f8699a79fb6eabba4ada248bd9022a954 (patch)
tree91d544a6eb513275ca7e881d969d792a6ebd9fe7
parentf6739689f4a4971ee069cd7d9d0eb226e80eb10c (diff)
downloadpaludis-9a8a0b7f8699a79fb6eabba4ada248bd9022a954.tar.gz
paludis-9a8a0b7f8699a79fb6eabba4ada248bd9022a954.tar.xz
Prevent sandbox from sourcing /etc/profile, and remove previous nasty partial workaround.
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash2
-rw-r--r--paludis/util/system.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 49f462f..7640245 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -20,8 +20,6 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-export PATH="${PATH_NOT_CLOBBERED_BY_SANDBOX}"
-
unalias -a
set +C
unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index 5349755..cac5c68 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -267,7 +267,11 @@ Command::with_sandbox()
Log::get_instance()->message("util.system.sandbox_in_sandbox", ll_warning, lc_no_context)
<< "Already inside sandbox, not spawning another sandbox instance";
else
+ {
_imp->command = "sandbox " + _imp->command;
+ if (getenv_with_default("BASH_ENV", "").empty())
+ with_setenv("BASH_ENV", "/dev/null");
+ }
#endif
return *this;
@@ -403,8 +407,6 @@ paludis::run_command(const Command & cmd)
for (Command::ConstIterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
setenv(s->first.c_str(), s->second.c_str(), 1);
- setenv("PATH_NOT_CLOBBERED_BY_SANDBOX", getenv_with_default("PATH", "").c_str(), 1);
-
if (cmd.pipe_command_handler())
{
setenv("PALUDIS_PIPE_COMMAND_WRITE_FD", stringify(pipe_command_reader->write_fd()).c_str(), 1);