Files
containerd/core/mount
Rodrigo Campos f8d84ecf92 core/mount: Prevent accidental removal of rootfs files
Using os.RemoveAll() is quite risky, as if the unmount failed and we
can delete files from the container rootfs. In fact, we were doing just
that.

Let's use os.Remove() to make sure we only deleted empty dirs.

Big kudos to @mbaynton for reporting this issue with lot of details,
nailing it down to containerd lines of code and showing all the log
lines to understand the big picture.

Fixes: #10704

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-09-24 17:45:34 +02:00
..
2024-01-17 09:52:12 -08:00
2024-01-17 09:52:12 -08:00
2024-01-17 09:52:12 -08:00
2024-01-17 09:52:12 -08:00
2024-01-17 09:52:12 -08:00
2024-01-17 09:52:12 -08:00
2024-01-17 09:52:12 -08:00
2024-01-17 09:52:12 -08:00