When xfs_healer cannot fix a filesystem problem on its own,
run_full_repair function tries to start an xfs_scrub service instance to
scan the entire filesystem. Unfortunately, as Codex points out, the
service definition for xfs_healer instances doesn't allow AF_UNIX
sockets, so that will fail. Relax the security posture so that we can
do that.
Cc: linux-xfs@vger.kernel.org # v7.0.0
Fixes: 88825fe0de0df2 ("xfs_healer: create a per-mount background monitoring service")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
# by our sandboxing. healer doesn't care about project ids anyway.
InaccessiblePaths=-/etc/projects
-# No network access
+# No network access except for systemd service bus for initiating full scans
PrivateNetwork=true
ProtectHostname=true
-RestrictAddressFamilies=none
+RestrictAddressFamilies=AF_UNIX
IPAddressDeny=any
# Don't let the program mess with the kernel configuration at all