aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-07 23:42:16 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-07 23:42:16 +0900
commitaff67586909974c3cbe571cf4293847ce38bb182 (patch)
tree3660674492a2b40f699674d2fca79616a4177646
parent4963d417b426e6855700362acf34c056287564b2 (diff)
downloadpoe-aff67586909974c3cbe571cf4293847ce38bb182.tar.gz
sandbox: ホームディレクトリに chdir
-rw-r--r--sandbox/child.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sandbox/child.c b/sandbox/child.c
index 9b2dc17..c52dc11 100644
--- a/sandbox/child.c
+++ b/sandbox/child.c
@@ -35,7 +35,7 @@ noreturn void poe_child_do(struct playground *pg,
if (!pw)
bug("getpwnam() failed");
- checked_syscall(chdir("/tmp"));
+ checked_syscall(chdir(pw->pw_dir));
checked_syscall(setsid());
gid_t grps[] = { POE_GID };
checked_syscall(setgroups(1, grps)); // set supplementary group IDs