platform_external_selinux/policycoreutils/scripts
Petr Lautrbach 25d7941aee fixfiles: Unmount temporary bind mounts on SIGINT
`fixfiles -M relabel` temporary bind mounts file systems before
relabeling, but it left the / directory mounted in /tmp/tmp.XXXX when a
user hit CTRL-C. It means that if the user run `fixfiles -M relabel`
again and answered Y to clean out /tmp directory, it would remove all
data from mounted fs.

This patch changes the location where `fixfiles` mounts fs to /run, uses
private mount namespace via unshare and adds a handler for exit signals
which tries to umount fs mounted by `fixfiles`.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2125355

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
Tested-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2022-11-23 08:28:23 -05:00
..
ru Add man pages translation by Olesya Gerasimenko 2019-01-28 12:03:57 +01:00
.gitignore Move policycoreutils/{sepolicy,audit2allow,semanage,scripts/chcat*} and sepolgen to python. 2016-11-16 11:19:50 -05:00
fixfiles fixfiles: Unmount temporary bind mounts on SIGINT 2022-11-23 08:28:23 -05:00
fixfiles.8 policycoreutils/fixfiles: Use parallel relabeling 2022-03-11 10:03:55 -05:00
Makefile Allow installing translated man pages 2019-01-28 12:03:57 +01:00