Skip to content

Commit

Permalink
fixup! zeek-archiver: Respect umask setting rather
Browse files Browse the repository at this point in the history
As reported by CodeQL, I guess not using 777 or 666 makes sense.
  • Loading branch information
awelzel committed Aug 27, 2024
1 parent 87cd0f1 commit 4f8e652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zeek-archiver/zeek-archiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static void parse_options(int argc, char** argv)

static bool make_dir(const char* dir)
{
if ( mkdir(dir, 0777) == 0 )
if ( mkdir(dir, 0775) == 0 )
return true;

auto mkdir_errno = errno;
Expand Down Expand Up @@ -540,7 +540,7 @@ static int run_compress_cmd(const char* src_file, const char* dst_file)
if ( src_fd != STDIN_FILENO )
close(src_fd);

int dst_fd = open(dst_file, O_CREAT | O_TRUNC | O_WRONLY, 0666);
int dst_fd = open(dst_file, O_CREAT | O_TRUNC | O_WRONLY, 0664);

if ( dst_fd < 0 )
{
Expand Down

0 comments on commit 4f8e652

Please sign in to comment.