containerd/runtime/v2/shim
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
..
publisher.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
shim_darwin.go runtime/v2: manager supports server interceptor 2022-07-22 23:25:40 +08:00
shim_freebsd.go runtime/v2: manager supports server interceptor 2022-07-22 23:25:40 +08:00
shim_linux.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
shim_test.go Use t.Setenv instead of os.Setenv 2022-04-01 13:53:17 -07:00
shim_unix.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
shim_windows.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
shim.go runtime/v2/shim: use structured log for plugin ID 2023-11-15 13:23:53 +01:00
util_test.go runtime/v2: manager supports server interceptor 2022-07-22 23:25:40 +08:00
util_unix.go Update go module to github.com/containerd/containerd/v2 2023-10-29 20:52:21 -07:00
util_windows.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
util.go shim: Create pid-file with 0644 permissions 2023-12-23 21:42:51 +01:00