Define PR_SET_NO_NEW_PRIVS for older glibc-s
authorRobert Swiecki <swiecki@google.com>
Fri, 22 May 2015 12:31:08 +0000 (14:31 +0200)
committerRobert Swiecki <swiecki@google.com>
Fri, 22 May 2015 12:31:08 +0000 (14:31 +0200)
sandbox.c

index 866271d841fde12a1a4fb9f92442e7083d8888e8..26094f1226e87a8334aca18ccc67d04eba2d2f6d 100644 (file)
--- a/sandbox.c
+++ b/sandbox.c
@@ -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;