diff options
Diffstat (limited to 'src/firejail/sandbox.c')
-rw-r--r-- | src/firejail/sandbox.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index 5cfee44d8..109395b60 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -748,6 +748,16 @@ int sandbox(void* sandbox_arg) { | |||
748 | } | 748 | } |
749 | 749 | ||
750 | //**************************************** | 750 | //**************************************** |
751 | // Set NO_NEW_PRIVS if desired | ||
752 | //**************************************** | ||
753 | int no_new_privs = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); | ||
754 | if(no_new_privs != 0) { | ||
755 | errExit("NO_NEW_PRIVS"); | ||
756 | } else | ||
757 | printf("No new privileges from this point on\n"); | ||
758 | |||
759 | |||
760 | //**************************************** | ||
751 | // fork the application and monitor it | 761 | // fork the application and monitor it |
752 | //**************************************** | 762 | //**************************************** |
753 | pid_t app_pid = fork(); | 763 | pid_t app_pid = fork(); |