diff options
author | 2020-08-22 07:45:58 -0400 | |
---|---|---|
committer | 2020-08-22 07:45:58 -0400 | |
commit | 07472ed702f416f8c684de8baff3b32761ebc32a (patch) | |
tree | 4bfeb5e53e2ae379dd30a80421ff29cdf1293a09 /src/fsec-print | |
parent | cleaning up POSTMORTEM code (diff) | |
parent | Merge pull request #3572 from smitsohu/dumpable (diff) | |
download | firejail-07472ed702f416f8c684de8baff3b32761ebc32a.tar.gz firejail-07472ed702f416f8c684de8baff3b32761ebc32a.tar.zst firejail-07472ed702f416f8c684de8baff3b32761ebc32a.zip |
Merge branch 'master' of https://github.com/netblue30/firejail
Diffstat (limited to 'src/fsec-print')
-rw-r--r-- | src/fsec-print/fsec_print.h | 1 | ||||
-rw-r--r-- | src/fsec-print/main.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/fsec-print/fsec_print.h b/src/fsec-print/fsec_print.h index 337199288..9d17e3f18 100644 --- a/src/fsec-print/fsec_print.h +++ b/src/fsec-print/fsec_print.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "../include/seccomp.h" | 23 | #include "../include/seccomp.h" |
24 | #include "../include/syscall.h" | 24 | #include "../include/syscall.h" |
25 | #include <sys/mman.h> | 25 | #include <sys/mman.h> |
26 | #include <sys/prctl.h> | ||
26 | 27 | ||
27 | // print.c | 28 | // print.c |
28 | void print(struct sock_filter *filter, int entries); | 29 | void print(struct sock_filter *filter, int entries); |
diff --git a/src/fsec-print/main.c b/src/fsec-print/main.c index ade45c881..d1f056e47 100644 --- a/src/fsec-print/main.c +++ b/src/fsec-print/main.c | |||
@@ -61,6 +61,11 @@ printf("\n"); | |||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | #ifdef WARN_DUMPABLE | ||
65 | if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 1 && getuid()) | ||
66 | fprintf(stderr, "Error fsec-print: I am dumpable\n"); | ||
67 | #endif | ||
68 | |||
64 | char *fname = argv[1]; | 69 | char *fname = argv[1]; |
65 | 70 | ||
66 | // open input file | 71 | // open input file |