]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_healer: allow AF_UNIX socket access for xfs_healer instances
authorDarrick J. Wong <djwong@kernel.org>
Thu, 11 Jun 2026 14:06:23 +0000 (07:06 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 17 Jun 2026 10:49:27 +0000 (12:49 +0200)
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>
healer/xfs_healer@.service.in

index 53f89cf9c4333dbdc8adc719d1b193dc545f7dbc..fd1aaf20e20bfdc6180617b167bd137ee4254022 100644 (file)
@@ -55,10 +55,10 @@ PrivateDevices=true
 # 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