]> git.sesse.net Git - bcachefs-tools-debian/blob - fsck/bcachefsck_all_fail.service.in
Disable pristine-tar option in gbp.conf, since there is no pristine-tar branch.
[bcachefs-tools-debian] / fsck / bcachefsck_all_fail.service.in
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # Copyright (C) 2023-2024 Oracle.  All Rights Reserved.
4 # Author: Darrick J. Wong <djwong@kernel.org>
5
6 [Unit]
7 Description=Online bcachefsck for All Filesystems Failure Reporting
8 Documentation=man:bcachefsck_all(8)
9
10 [Service]
11 Type=oneshot
12 Environment=EMAIL_ADDR=root
13 ExecStart=@libexecdir@/bcachefsck_fail "${EMAIL_ADDR}" bcachefsck_all
14 User=mail
15 Group=mail
16 SupplementaryGroups=systemd-journal
17
18 # No realtime scheduling
19 RestrictRealtime=true
20
21 # Make the entire filesystem readonly and /home inaccessible.
22 ProtectSystem=full
23 ProtectHome=yes
24 PrivateTmp=true
25 RestrictSUIDSGID=true
26
27 # Emailing reports requires network access, but not the ability to change the
28 # hostname.
29 ProtectHostname=true
30
31 # Don't let the program mess with the kernel configuration at all
32 ProtectKernelLogs=true
33 ProtectKernelModules=true
34 ProtectKernelTunables=true
35 ProtectControlGroups=true
36 ProtectProc=invisible
37 RestrictNamespaces=true
38
39 # Can't hide /proc because journalctl needs it to find various pieces of log
40 # information
41 #ProcSubset=pid
42
43 # Only allow the default personality Linux
44 LockPersonality=true
45
46 # No writable memory pages
47 MemoryDenyWriteExecute=true
48
49 # Don't let our mounts leak out to the host
50 PrivateMounts=true
51
52 # Restrict system calls to the native arch and only enough to get things going
53 SystemCallArchitectures=native
54 SystemCallFilter=@system-service
55 SystemCallFilter=~@privileged
56 SystemCallFilter=~@resources
57 SystemCallFilter=~@mount
58
59 # xfs_scrub needs these privileges to run, and no others
60 CapabilityBoundingSet=
61 NoNewPrivileges=true
62
63 # Failure reporting shouldn't create world-readable files
64 UMask=0077
65
66 # Clean up any IPC objects when this unit stops
67 RemoveIPC=true
68
69 # No access to hardware device files
70 PrivateDevices=true
71 ProtectClock=true