summaryrefslogtreecommitdiff
path: root/scrub
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2019-05-05 22:26:04 -0400
committerTheodore Ts'o <tytso@mit.edu>2019-05-06 10:15:41 -0400
commit06014d726d53393b83692edb07e35db49c5988b9 (patch)
tree5607b7a83deda5be9f2090e47160f4f32199718a /scrub
parent66300c5701d267f875613f094264c0531e826cce (diff)
downloade2fsprogs-06014d726d53393b83692edb07e35db49c5988b9.tar.gz
e2scrub: make the e2scrub service files require CAP_SYS_ADMIN and CAP_SYS_RAWIO
Addresses-Debian-Bug: #926138 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'scrub')
-rw-r--r--scrub/e2scrub_all.service.in2
-rw-r--r--scrub/e2scrub_reap.service.in2
2 files changed, 4 insertions, 0 deletions
diff --git a/scrub/e2scrub_all.service.in b/scrub/e2scrub_all.service.in
index bc05184b..20f42bfe 100644
--- a/scrub/e2scrub_all.service.in
+++ b/scrub/e2scrub_all.service.in
@@ -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]
diff --git a/scrub/e2scrub_reap.service.in b/scrub/e2scrub_reap.service.in
index b0536151..cf26437c 100644
--- a/scrub/e2scrub_reap.service.in
+++ b/scrub/e2scrub_reap.service.in
@@ -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]