From: Zac Medico Date: Mon, 20 Mar 2006 09:04:02 +0000 (-0000) Subject: Fix sandbox feature (broken since r2947). X-Git-Tag: v2.1_pre7~19 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=c0462311696cdc8f82b945b4c90070a9fd89ef9f;p=portage.git Fix sandbox feature (broken since r2947). svn path=/main/trunk/; revision=2963 --- 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)