diff options
author | 2020-08-22 06:41:56 -0500 | |
---|---|---|
committer | 2020-08-22 06:41:56 -0500 | |
commit | 14f7b4decb811eb2e0d2c4d5a10bfd16351a7a5a (patch) | |
tree | 2dfd331b7bededc4bb4d12c25386652d8dc4bff0 /src/fnetfilter/main.c | |
parent | Merge pull request #3594 from smitsohu/ls (diff) | |
parent | cleanup (diff) | |
download | firejail-14f7b4decb811eb2e0d2c4d5a10bfd16351a7a5a.tar.gz firejail-14f7b4decb811eb2e0d2c4d5a10bfd16351a7a5a.tar.zst firejail-14f7b4decb811eb2e0d2c4d5a10bfd16351a7a5a.zip |
Merge pull request #3572 from smitsohu/dumpable
hardening: run plugins with dumpable flag cleared
Diffstat (limited to 'src/fnetfilter/main.c')
-rw-r--r-- | src/fnetfilter/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fnetfilter/main.c b/src/fnetfilter/main.c index 8124beb1a..1ca35ab56 100644 --- a/src/fnetfilter/main.c +++ b/src/fnetfilter/main.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
19 | */ | 19 | */ |
20 | #include "../include/common.h" | 20 | #include "../include/common.h" |
21 | #include <sys/prctl.h> | ||
21 | 22 | ||
22 | #define MAXBUF 4098 | 23 | #define MAXBUF 4098 |
23 | #define MAXARGS 16 | 24 | #define MAXARGS 16 |
@@ -180,7 +181,10 @@ printf("\n"); | |||
180 | usage(); | 181 | usage(); |
181 | return 1; | 182 | return 1; |
182 | } | 183 | } |
183 | 184 | #ifdef WARN_DUMPABLE | |
185 | if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 1 && getuid()) | ||
186 | fprintf(stderr, "Error fnetfilter: I am dumpable\n"); | ||
187 | #endif | ||
184 | char *destfile = (argc == 3)? argv[2]: argv[1]; | 188 | char *destfile = (argc == 3)? argv[2]: argv[1]; |
185 | char *command = (argc == 3)? argv[1]: NULL; | 189 | char *command = (argc == 3)? argv[1]: NULL; |
186 | //printf("command %s\n", command); | 190 | //printf("command %s\n", command); |