aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-02-12 09:33:06 +0000
committersin <sin@2f30.org>2014-02-12 09:33:06 +0000
commitc09709f04fb60c89e0b6d401eac8785d4523b52d (patch)
tree35ed84a40b3aed3b9405c30d34862e2f6f60e686
parent31dbd779dcbd5b7c2cd96a008f1f93c035e0a4f7 (diff)
Sanitize working dir - default to "/"
-rw-r--r--sinit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sinit.c b/sinit.c
index e938f3e..c696a96 100644
--- a/sinit.c
+++ b/sinit.c
@@ -36,6 +36,8 @@ main(void)
return EXIT_FAILURE;
setsid();
+ chdir("/");
+
sigemptyset(&set);
for (i = 0; i < LEN(sigmap); i++)
sigaddset(&set, sigmap[i].sig);