Skip to content

Commit 8d82242

Browse files
committed
shim: Create address file with 0644 permissions
Fixes ae70213 In ae70213 the WritePidFile and WriteAddress functions were changed to use AtomicFile instead of os.CreateFile. However, AtomicFile creates a temporary file and then changes its permissions with os.Chmod which alters the previously observed behavior of os.CreateFile which takes the system's umask into account. This means that on Linux-based systems these files suddenly became world writable (#9363). Signed-off-by: Jaroslav Jindrak <[email protected]>
1 parent 260963a commit 8d82242

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/v2/shim/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func WriteAddress(path, address string) error {
144144
if err != nil {
145145
return err
146146
}
147-
f, err := atomicfile.New(path, 0o666)
147+
f, err := atomicfile.New(path, 0o644)
148148
if err != nil {
149149
return err
150150
}

0 commit comments

Comments
 (0)