-Me: set PR_SET_DUMPABLE,0 for the init

This commit is contained in:
Robert Swiecki 2017-06-14 02:21:53 +02:00
parent b67ea2272f
commit 54da7fca11

4
pid.c
View File

@ -47,12 +47,16 @@ bool pidInitNs(struct nsjconf_t *nsjconf)
if (pid > 0) {
return true;
}
if (prctl(PR_SET_PDEATHSIG, SIGKILL, 0UL, 0UL, 0UL) == -1) {
PLOG_W("(prctl(PR_SET_PDEATHSIG, SIGKILL) failed");
}
if (prctl(PR_SET_NAME, "init", 0UL, 0UL, 0UL) == -1) {
PLOG_W("(prctl(PR_SET_NAME, 'init') failed");
}
if (prctl(PR_SET_DUMPABLE, 0UL, 0UL, 0UL, 0UL) == -1) {
PLOG_W("(prctl(PR_SET_DUMPABLE, 0) failed");
}
/* Act sort-a like a init by reaping zombie processes */
struct sigaction sa = {