selinux/policycoreutils
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
..
.tx
hll Fix many misspellings 2019-09-18 22:47:35 +02:00
load_policy selinux: Remove legacy local boolean and user code 2019-07-29 23:46:24 +02:00
man Modified Russian and English man pages to fix typo; REQUIREUSERS -> REQUIRESEUSERS 2021-11-29 18:51:19 +01:00
newrole libselinux: declare return value of context_str(3) const 2022-06-02 08:29:01 -04:00
po Update translations 2022-10-05 08:13:26 -04:00
run_init Correct misc typos 2022-04-12 13:09:52 -04:00
scripts fixfiles: Unmount temporary bind mounts on SIGINT 2022-11-23 08:28:23 -05:00
secon policycoreutils: handle argument counter of zero 2022-02-07 11:14:26 -05:00
semodule semodule: rename --rebuild-if-modules-changed to --refresh 2022-06-30 21:09:28 +02:00
sestatus policycoreutils: mark local functions static 2021-11-15 16:00:54 -05:00
setfiles setfiles: introduce the -C option for distinguishing file tree walk errors 2022-05-04 10:31:43 +02:00
setsebool setsebool: report errors from commit phase 2020-04-28 09:26:26 +02:00
.gitignore
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile
VERSION Update VERSIONs to 3.4 for release. 2022-05-18 16:51:03 +02:00