SECURITY IMPORTANCE - recommend reading for systemd packaging
Thanks for sharing Otto,
Note the IPC Lock commit
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/172c7d3fa579e5365fd0e048f8d655b5e83e848ewas something I reverted on
https://github.com/MariaDB/server/pull/3157 after an obscure case of using env OPENSSL_CONF to control settings was incompatible with any setcap cap_ipc_lock+ep on the mariadbd executable.
CAP_DAC_OVERRIDE CAP_AUDIT_WRITE moving with CAP_IPC_LOCK to AmbientCapabilities was probably a mistake.
In the systemd service files the following probably a much safer option. This is the one I'm considering.
CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
AmbientCapabilities=CAP_IPC_LOCK
If packagers truly want a safe option probably:
CapabilityBoundingSet=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
This is better though that means users have a choice of env OPENSSL_CONFIG or --memlock depending on if they use secap themself on the executable.
Noting I haven't looked strongly at how the Debian PAM needs DAC/AUDIT_WRITE beyond the systemd service file comments.
Thanks for your attention to packaging MariaDB.