-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpagecache-guard.service
More file actions
33 lines (30 loc) · 1.02 KB
/
Copy pathpagecache-guard.service
File metadata and controls
33 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[Unit]
Description=Page Cache Integrity Guard (fanotify + O_DIRECT)
Documentation=https://github.com/0xlane/pagecache-guard
After=local-fs.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 -m pagecache_guard \
--check-root \
--watch-daemon crond,anacron,atd,systemd \
--watch-file /etc/passwd /etc/profile /etc/ld.so.preload \
--watch-pam /lib64/security \
--watch-lib /lib64/libnss_files.so.2 /lib64/libpam.so.0 \
--syslog \
--log-file /var/log/pagecache-guard/guard.log \
-- /usr /bin /sbin
WorkingDirectory=/opt/pagecache-guard
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
SyslogIdentifier=pagecache-guard
LogsDirectory=pagecache-guard
# Hardening
# NOTE: ProtectHome/ProtectSystem create mount namespaces which break
# FAN_MARK_MOUNT — only use them if the kernel supports FAN_MARK_FILESYSTEM.
NoNewPrivileges=false
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_READ_SEARCH
AmbientCapabilities=CAP_SYS_ADMIN CAP_DAC_READ_SEARCH
[Install]
WantedBy=multi-user.target