Define PR_SET_NO_NEW_PRIVS for older glibc-s

This commit is contained in:
Robert Swiecki 2015-05-22 14:31:08 +02:00
parent 08d1add31d
commit dcc0565338

View File

@ -73,7 +73,9 @@ static bool sandboxPrepareAndCommit(void)
LOG_W("bpf_resolve_jumps() failed");
return false;
}
#ifndef PR_SET_NO_NEW_PRIVS
#define PR_SET_NO_NEW_PRIVS 38
#endif /* PR_SET_NO_NEW_PRIVS */
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {
PLOG_W("prctl(PR_SET_NO_NEW_PRIVS, 1) failed");
return false;