MDEV-10298: Systemd hardening
Add ProtectSystem=full, NoNewPrivileges=true, PrivateDevices=true, and ProtectHome=true to the systemd units.
This commit is contained in:
parent
f280a87c66
commit
53e7fcca41
@ -45,6 +45,16 @@ Group=mysql
|
||||
# To allow memlock to be used as non-root user if set in configuration
|
||||
CapabilityBoundingSet=CAP_IPC_LOCK
|
||||
|
||||
# Prevent writes to /usr, /boot, and /etc
|
||||
ProtectSystem=full
|
||||
|
||||
NoNewPrivileges=true
|
||||
|
||||
PrivateDevices=true
|
||||
|
||||
# Prevent accessing /home, /root and /run/user
|
||||
ProtectHome=true
|
||||
|
||||
# Execute pre and post scripts as root, otherwise it does it as User=
|
||||
PermissionsStartOnly=true
|
||||
|
||||
|
@ -52,6 +52,16 @@ Group=mysql
|
||||
# To allow memlock to be used as non-root user if set in configuration
|
||||
CapabilityBoundingSet=CAP_IPC_LOCK
|
||||
|
||||
# Prevent writes to /usr, /boot, and /etc
|
||||
ProtectSystem=full
|
||||
|
||||
NoNewPrivileges=true
|
||||
|
||||
PrivateDevices=true
|
||||
|
||||
# Prevent accessing /home, /root and /run/user
|
||||
ProtectHome=true
|
||||
|
||||
# Execute pre and post scripts as root, otherwise it does it as User=
|
||||
PermissionsStartOnly=true
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user