From c09709f04fb60c89e0b6d401eac8785d4523b52d Mon Sep 17 00:00:00 2001 From: sin Date: Wed, 12 Feb 2014 09:33:06 +0000 Subject: Sanitize working dir - default to "/" --- sinit.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3-70-g09d2