-Me: set PR_SET_DUMPABLE,0 for the init
This commit is contained in:
parent
b67ea2272f
commit
54da7fca11
4
pid.c
4
pid.c
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user