![](https://secure.gravatar.com/avatar/39b623a1559cf9c69ac3d9d4fb44e7fe.jpg?s=120&d=mm&r=g)
12 Mar
2021
12 Mar
'21
8:15 a.m.
Hi, Lukas!
I found that setuid/setgid is used inside mysqld_safe_helper (mariadbd-safe-helper). Are there any other cases when MariaDB uses these functions?
Yes, in the server. If the server is started with --memlock it does mlockall(MCL_CURRENT) to prevent itself from being swapped. This needs root, and the server uses setuid/setgid to drop root privileges after mlockall. Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org