aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-12-02 23:53:52 -0500
committerMike Frysinger <vapier@gentoo.org>2012-12-24 00:23:50 -0500
commitfc0edcbe3114b885c5bcfe10cb00a68f9855c78d (patch)
tree0d8197540fe717a939b3dd8dc1c7fd1353a615d9 /src
parentsb_efunc: delete (diff)
downloadsandbox-fc0edcbe3114b885c5bcfe10cb00a68f9855c78d.tar.gz
sandbox-fc0edcbe3114b885c5bcfe10cb00a68f9855c78d.tar.bz2
sandbox-fc0edcbe3114b885c5bcfe10cb00a68f9855c78d.zip
sandbox: allow log files to fallback to tmpdir
Since non-root users typically do not have write access to /var/log, allow it to fallback to standard tmpdirs. This makes testing locally a lot easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/sandbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sandbox.c b/src/sandbox.c
index 54fbb98..a5920c4 100644
--- a/src/sandbox.c
+++ b/src/sandbox.c
@@ -61,7 +61,7 @@ static int setup_sandbox(struct sandbox_info_t *sandbox_info, bool interactive)
get_sandbox_rc(sandbox_info->sandbox_rc);
/* Generate sandbox log full path */
- get_sandbox_log(sandbox_info->sandbox_log);
+ get_sandbox_log(sandbox_info->sandbox_log, sandbox_info->tmp_dir);
if (rc_file_exists(sandbox_info->sandbox_log)) {
if (-1 == unlink(sandbox_info->sandbox_log)) {
sb_pwarn("could not unlink old log file: %s",
@@ -71,7 +71,7 @@ static int setup_sandbox(struct sandbox_info_t *sandbox_info, bool interactive)
}
/* Generate sandbox debug log full path */
- get_sandbox_debug_log(sandbox_info->sandbox_debug_log);
+ get_sandbox_debug_log(sandbox_info->sandbox_debug_log, sandbox_info->tmp_dir);
if (rc_file_exists(sandbox_info->sandbox_debug_log)) {
if (-1 == unlink(sandbox_info->sandbox_debug_log)) {
sb_pwarn("could not unlink old debug log file: %s",