sys-apps/sandbox. Note that using Mac OS X sandbox slows down the
emerge process considerably, in particular for write operations.
.TP
+.B sandbox-debug
+Enable debug messages regarding sandboxing. This currently only has
+an effect on Mac OS X platforms where it enables logging of denied
+access into /var/log/system.log. Note that logging is extremely slow
+and will slow down the emerge process considerably.
+.TP
.B sesandbox
Enable SELinux sandbox\-ing. Do not toggle this \fBFEATURE\fR yourself.
.TP
(allow default)
-(deny file-write* (with no-log))
+(deny file-write*@@LOGGING@@)
(allow file-read* file-write*
(literal
#"^(/private)?/var/run/syslog$"
)
)'''
+MACOSSANDBOX_NOLOG=" (with no-log)"
PORTAGE_GROUPNAME = portagegroup
PORTAGE_USERNAME = portageuser
"noauto", "noclean", "nodoc", "noinfo", "noman",
"nostrip", "notitles", "parallel-fetch", "parallel-install",
"prelink-checksums", "preserve-libs",
- "protect-owned", "python-trace", "sandbox",
+ "protect-owned", "python-trace", "sandbox", "sandbox-debug",
"selinux", "sesandbox", "sfperms",
"sign", "skiprocheck", "split-elog", "split-log", "splitdebug",
"strict", "stricter", "suidctl", "test", "test-fail-continue",
_shell_quote, _unicode_decode, _unicode_encode
from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_ENV_DIR, \
EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY, \
- EPREFIX, MACOSSANDBOX_PROFILE
+ EPREFIX, MACOSSANDBOX_PROFILE, MACOSSANDBOX_NOLOG
from portage.data import portage_gid, portage_uid, secpass, \
uid, userpriv_groups
from portage.dbapi.porttree import _parse_uri_map
sbprofile = sbprofile.replace("@@WRITEABLE_PREFIX@@", sbprefixpath)
sbprofile = sbprofile.replace("@@WRITEABLE_PREFIX_RE@@", sbprefixre)
+ if "sandbox-debug" in features:
+ sbprofile = sbprofile.replace("@@LOGGING@@", "")
+ else:
+ sbprofile = sbprofile.replace("@@LOGGING@@", MACOSSANDBOX_NOLOG)
+
keywords["profile"] = sbprofile
spawn_func = portage.process.spawn_macossandbox
else: