[MDEV-14707] systemd: remove PermissionsStartOnly=true (by removing environment _WSREP_START_POSITION) Created: 2017-12-19 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 10.4 |
| Type: | Task | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Daniel Black |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | systemd | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
If we could replace this with another mechanism we can run as the ordinary User= and make the scripts less vulnerable to CVEs. This will also enable a multi-instance where each user is different without the complication of re-acquiring the systemd user for the service. |
| Comments |
| Comment by Daniel Black [ 2017-12-20 ] | ||
|
Seems Debian has the following (from: cmake/systemd.cmake) which needs to be accounted for without PermissionsStartOnly=true:
This looks like it will be handled with tmpfiles.conf and should be removed. And:
Option 1(from ./debian/additions/debian-start), Also a SQL user```mysql`` with unix socket auth system user should be created and listed in /etc/mysql/debian.cnf Option 2Alternately Debian could inject PermissionsStartOnly=true into SYSTEMD_EXECSTARTPRE and not change anything. Which parts of this are or are not acceptable otto or oerdnj? | ||
| Comment by Daniel Black [ 2018-02-22 ] | ||
|
So I think the wsrep_start_position could be written to a datadir file however we'll need to ensure the sst mechanisms like rsync don't copy it. Implementing the mysqld --wsrep_start_position_init=file and handling this in wsrep_start_position_ {init,valid}might be easier than too much scripting in the systemd service file. | ||
| Comment by Faustin Lammler [ 2022-02-01 ] | ||
|
`PermissionsStartOnly=` is deprecated see: https://github.com/systemd/systemd/pull/10802#issuecomment-439446299 Use of prefix is now suggested, see https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= | ||
| Comment by Daniel Black [ 2022-02-02 ] | ||
|
MDEV-19210 can remove the need entirely. |