Browse Source

Merge c449994e22 into 5cd873123c

pull/195/merge
TubbyCat 1 month ago
committed by GitHub
parent
commit
1ab2d9785e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 37 additions and 0 deletions
  1. +17
    -0
      log2ram-daily.service
  2. +20
    -0
      log2ram.service

+ 17
- 0
log2ram-daily.service View File

@@ -5,3 +5,20 @@ Documentation=https://github.com/azlux/log2ram


[Service] [Service]
ExecStart=/bin/systemctl reload log2ram.service ExecStart=/bin/systemctl reload log2ram.service

# Sandboxing
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPriviliges=true
PrivateDevices=true
PrivateNetwork=true
#May affect "Mail" in log2ram.conf.
ProtectClock=true
ProtectControlGroups=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
RestrictSUIDSGID=true
ProtectSystem=strict
ProtectHome=true

+ 20
- 0
log2ram.service View File

@@ -16,5 +16,25 @@ ExecReload=/usr/local/bin/log2ram write
TimeoutStartSec=120 TimeoutStartSec=120
RemainAfterExit=yes RemainAfterExit=yes


# Sandboxing
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPriviliges=true
PrivateDevices=true
PrivateNetwork=true
#May break "MAIL" in log2ram.conf if it points to non-local web address.
ProtectClock=true
ProtectControlGroups=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
RestrictSUIDSGID=true
ProtectSystem=true
# ALT: ProtectSystem=full # needs rw whitelisting for /var/hdd.log/
ProtectHome=true
#may cause breakage in situations wherein user has configured log2ram to also copy logs from $HOME.
#can probably fix with systemctl edit to whitelist relevant dirs. See: ReadWritePaths=

[Install] [Install]
WantedBy=sysinit.target WantedBy=sysinit.target

Loading…
Cancel
Save