From c0462311696cdc8f82b945b4c90070a9fd89ef9f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 20 Mar 2006 09:04:02 +0000 Subject: [PATCH] Fix sandbox feature (broken since r2947). svn path=/main/trunk/; revision=2963 --- pym/portage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pym/portage.py b/pym/portage.py index 586fe46d8..929a541c4 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1641,15 +1641,17 @@ def spawn(mystring,mysettings,debug=0,free=0,droppriv=0,sesandbox=0,fd_pipes=Non if free: keywords["opt_name"] += " bash" + spawn_func = portage_exec.spawn_bash else: keywords["opt_name"] += " sandbox" + spawn_func = portage_exec.spawn_sandbox if sesandbox: con = selinux.getcontext() con = string.replace(con, mysettings["PORTAGE_T"], mysettings["PORTAGE_SANDBOX_T"]) selinux.setexec(con) - retval = portage_exec.spawn_bash(mystring, env=env, **keywords) + retval = spawn_func(mystring, env=env, **keywords) if sesandbox: selinux.setexec(None) -- 2.26.2