about summary refs log tree commit diff
path: root/src/afl-showmap.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-03-23 20:20:59 +0100
committervanhauser-thc <vh@thc.org>2021-03-23 20:21:08 +0100
commitdfe6f7f8c949744eeab7a401affde93729a5b39d (patch)
tree18c4cd0370a184b26afa10b4a86da6da9cfdace0 /src/afl-showmap.c
parent5fcd634f05049564dde59df420ac1c2f291a2fb0 (diff)
downloadafl++-dfe6f7f8c949744eeab7a401affde93729a5b39d.tar.gz
make setting different file permissions easy via config.h
Diffstat (limited to 'src/afl-showmap.c')
-rw-r--r--src/afl-showmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 7bf5a9c7..cc0f1a7e 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -252,7 +252,7 @@ static u32 write_results_to_file(afl_forkserver_t *fsrv, u8 *outfile) {
   } else {
 
     unlink(outfile);                                       /* Ignore errors */
-    fd = open(outfile, O_WRONLY | O_CREAT | O_EXCL, 0600);
+    fd = open(outfile, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
     if (fd < 0) { PFATAL("Unable to create '%s'", outfile); }
 
   }
@@ -1119,7 +1119,7 @@ int main(int argc, char **argv_orig, char **envp) {
     unlink(stdin_file);
     atexit(at_exit_handler);
     fsrv->out_file = stdin_file;
-    fsrv->out_fd = open(stdin_file, O_RDWR | O_CREAT | O_EXCL, 0600);
+    fsrv->out_fd = open(stdin_file, O_RDWR | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
     if (fsrv->out_fd < 0) { PFATAL("Unable to create '%s'", out_file); }
 
     if (arg_offset && use_argv[arg_offset] != stdin_file) {