diff options
Diffstat (limited to 'src/fldd')
-rw-r--r-- | src/fldd/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fldd/main.c b/src/fldd/main.c index dd22e601e..567f6c566 100644 --- a/src/fldd/main.c +++ b/src/fldd/main.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <fcntl.h> | 24 | #include <fcntl.h> |
25 | #include <sys/mman.h> | 25 | #include <sys/mman.h> |
26 | #include <sys/mount.h> | 26 | #include <sys/mount.h> |
27 | #include <sys/prctl.h> | ||
27 | #include <sys/stat.h> | 28 | #include <sys/stat.h> |
28 | #include <sys/types.h> | 29 | #include <sys/types.h> |
29 | #include <unistd.h> | 30 | #include <unistd.h> |
@@ -302,6 +303,11 @@ printf("\n"); | |||
302 | return 0; | 303 | return 0; |
303 | } | 304 | } |
304 | 305 | ||
306 | #ifdef WARN_DUMPABLE | ||
307 | if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 1 && getuid() && getenv("FIREJAIL_PLUGIN")) | ||
308 | fprintf(stderr, "Error fldd: I am dumpable\n"); | ||
309 | #endif | ||
310 | |||
305 | // check program access | 311 | // check program access |
306 | if (access(argv[1], R_OK)) { | 312 | if (access(argv[1], R_OK)) { |
307 | fprintf(stderr, "Error fldd: cannot access %s\n", argv[1]); | 313 | fprintf(stderr, "Error fldd: cannot access %s\n", argv[1]); |