fs.zig: create temp files with 0o700, not 0o007 (#4107)

This commit is contained in:
Adhityaa Chandrasekar
2023-08-10 17:00:13 -04:00
committed by GitHub
parent 58e74eadb5
commit cf12d80f5e

View File

@@ -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 {