Skip to content
/ server Public
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions support-files/mariadb.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ ProtectSystem=full
# Doesn't yet work properly with SELinux enabled
# NoNewPrivileges=true

# Restrict modifications of kernel interfaces from the MariaDB service context.
#
# Note: ProtectKernelTunables makes /proc and /sys read-only, but it does not
# necessarily remount separate sub-mounts under /sys/fs (for example cgroupfs
# at /sys/fs/cgroup and selinuxfs at /sys/fs/selinux), so writes there may
# still be allowed.
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
#
# Prevent creating real-time scheduling policies.
RestrictRealtime=true
#
# Prevent changing process personality(2)
LockPersonality=true
#
# Restrict use of Linux namespaces by the daemon and its children, MariaDB
# server core does not require namespace creation in typical operation
# (override via drop-in if needed).
RestrictNamespaces=true

# Prevent accessing /home, /root and /run/user
ProtectHome=true

Expand Down
21 changes: 21 additions & 0 deletions support-files/mariadb@.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,27 @@ ProtectSystem=full
# (https://github.com/systemd/systemd/issues/3845)
# NoNewPrivileges=true

# Restrict modifications of kernel interfaces from the MariaDB service context.
#
# Note: ProtectKernelTunables makes /proc and /sys read-only, but it does not
# necessarily remount separate sub-mounts under /sys/fs (for example cgroupfs
# at /sys/fs/cgroup and selinuxfs at /sys/fs/selinux), so writes there may
# still be allowed.
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
#
# Prevent creating real-time scheduling policies.
RestrictRealtime=true
#
# Prevent changing process personality(2)
LockPersonality=true
#
# Restrict use of Linux namespaces by the daemon and its children, MariaDB
# server core does not require namespace creation in typical operation
# (override via drop-in if needed).
RestrictNamespaces=true

# Prevent accessing /home, /root and /run/user
ProtectHome=true

Expand Down