spiegel_podman/pkg/rootless
K J Sundeep Kumar 2ec62711c1
rootless: clear environment before spawning pause process
When spawning the pause process, environment variables were inherited from
the parent process before setting _PODMAN_PAUSE=1. If the parent environment
exceeded 4096 bytes, _PODMAN_PAUSE=1 was placed beyond the first 4KB chunk
read by is_pause_process(), causing a valid pause process to be treated as
stale and its PID file unlinked.

Call clearenv() prior to setting _PODMAN_PAUSE=1 so the pause process
environment only contains the required pause marker. In addition, ensure
is_pause_process() explicitly bounds its read buffer with a null terminator.

Fixes: #29650
Signed-off-by: K J Sundeep Kumar <sundeep8967@gmail.com>
2026-09-02 22:04:27 +05:30
..
rootless.go Replace os.Is* error checks with errors.Is 2026-05-21 13:09:42 -07:00
rootless_freebsd.c pkg/rootless: Implement rootless.IsFdInherited on FreeBSD 2022-11-15 08:18:41 +00:00
rootless_freebsd.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
rootless_linux.c rootless: clear environment before spawning pause process 2026-09-02 22:04:27 +05:30
rootless_linux.go pkg/rootless: modernize 2026-05-22 12:25:21 -07:00
rootless_test.go rootless: use nsfs file handles to persist namespaces 2026-01-20 18:41:59 +01:00
rootless_unsupported.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00