containerd/runtime
Jaroslav Jindrak 9d328410a5 shim: Create pid-file with 0644 permissions
Fixes ae7021300

In ae7021300 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). The address file has since been
removed, but pid-file was still created as world writable. This
commit explicitly requests 0644 permissions as even on systems
without default umask of 0022 there is no reason to have these
two files world writable.

Signed-off-by: Jaroslav Jindrak <dzejrou@gmail.com>
2023-12-23 21:42:51 +01:00
..
opts Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
restart Switch to github.com/containerd/plugin 2023-11-01 23:01:42 -07:00
v2 shim: Create pid-file with 0644 permissions 2023-12-23 21:42:51 +01:00
events.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
monitor.go Add runtime label to metrics 2021-07-23 10:04:46 -07:00
nsmap.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
runtime.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
task.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
typeurl.go go.mod: github.com/containerd/typeurl/v2 v2.1.0 2023-02-11 23:39:52 +09:00