Whamcloud - gitweb
e2scrub: make the e2scrub service files require CAP_SYS_ADMIN and CAP_SYS_RAWIO
authorTheodore Ts'o <tytso@mit.edu>
Mon, 6 May 2019 02:26:04 +0000 (22:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 6 May 2019 14:15:41 +0000 (10:15 -0400)
Addresses-Debian-Bug: #926138

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
scrub/e2scrub_all.service.in
scrub/e2scrub_reap.service.in

index bc05184..20f42bf 100644 (file)
@@ -1,6 +1,8 @@
 [Unit]
 Description=Online ext4 Metadata Check for All Filesystems
 ConditionACPower=true
+ConditionCapability=CAP_SYS_ADMIN
+ConditionCapability=CAP_SYS_RAWIO
 Documentation=man:e2scrub_all(8)
 
 [Service]
index b053615..cf26437 100644 (file)
@@ -1,5 +1,7 @@
 [Unit]
 Description=Remove Stale Online ext4 Metadata Check Snapshots
+ConditionCapability=CAP_SYS_ADMIN
+ConditionCapability=CAP_SYS_RAWIO
 Documentation=man:e2scrub_all(8)
 
 [Service]