Skip to content

Commit

Permalink
fs.zig: create temp files with 0o700, not 0o007 (#4107)
Browse files Browse the repository at this point in the history
  • Loading branch information
adtac authored and Jarred-Sumner committed Aug 11, 2023
1 parent c1dd6be commit 7af3f14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fs.zig
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ pub const FileSystem = struct {

const flags = std.os.O.CREAT | std.os.O.RDWR | std.os.O.CLOEXEC;
this.dir_fd = tmpdir_.fd;
this.fd = try std.os.openatZ(tmpdir_.fd, name, flags, std.os.S.IRWXO);
this.fd = try std.os.openatZ(tmpdir_.fd, name, flags, std.os.S.IRWXU);
}

pub fn promote(this: *Tmpfile, from_name: [*:0]const u8, destination_fd: std.os.fd_t, name: [*:0]const u8) !void {
Expand Down

0 comments on commit 7af3f14

Please sign in to comment.