Bug #92224 | Use "Environment" to set LD_PRELOAD in systemctl is not working | ||
---|---|---|---|
Submitted: | 29 Aug 2018 10:46 | Modified: | 17 Dec 2019 10:00 |
Reporter: | chen chen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S3 (Non-critical) |
Version: | 8.0.12 | OS: | Any (7.4) |
Assigned to: | CPU Architecture: | x86 |
[29 Aug 2018 10:46]
chen chen
[31 Aug 2018 11:05]
Terje Røsten
Hi! Thanks for your report! You are right, indeed setting LD_PRELOAD=... environment variable don't take effect. This is due to this scriptlet in the RPM spec file: /usr/sbin/setcap cap_sys_nice+ep /usr/sbin/mysqld this has the side effect that the binary is suid as seen from systemd, and systemd disable LD_PRELOAD for suid executables. You can verify this by doing: $ setcap -r /usr/sbin/mysqld Note: removing CAP_SYS_NICE capability will disable the Resource Group feature: https://dev.mysql.com/doc/refman/8.0/en/resource-groups.html
[17 Dec 2019 10:00]
Terje Røsten
Hi! This issue was fixed by this commit: https://github.com/mysql/mysql-server/commit/d10ff5ac64088119164572cbca729516dcb893de