summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDaniel Black <grooverdan@users.sourceforge.net>2015-10-14 07:46:31 +0200
committerSergey Vojtovich <svoj@mariadb.org>2015-10-14 12:45:59 +0200
commit3723c70a304566d867b6fb22f1b102d389d66321 (patch)
tree03a6bf444392f1243c8c1c599b61b87e2a7ad497 /cmake
parent079cc48e063adc3c132404cbab178fbf66750160 (diff)
downloadmariadb-git-3723c70a304566d867b6fb22f1b102d389d66321.tar.gz
MDEV-426: systemd PermissionsStartOnly=true by default
mariadb-service-convert during migration can create a file containing ExecStartPre=/usr/sbin/sysctl -q -w vm.drop_caches=3 if the users my.cnf contains [mysqld_safe] flush_caches. This sysctl entry change requires root access. No existing ExecStartPre requires execution requires execution as another user. There is a comment in the mariadb{,@}.service.in that indicates mysqld_install which would require -u mysql to explicity change user to mysql from root since PermissionsStartOnly=true. Otherwise the following error would be generated: Oct 14 07:38:38 spaceman systemd[1]: Starting MariaDB database server... -- Subject: Unit mariadb.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mariadb.service has begun starting up. Oct 14 07:38:38 spaceman sysctl[10089]: sysctl: permission denied on key 'vm.drop_caches' Oct 14 07:38:38 spaceman systemd[1]: mariadb.service: control process exited, code=exited status=255 Oct 14 07:38:38 spaceman systemd[1]: Failed to start MariaDB database server.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/systemd.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake
index f031f4be0f4..30374e4c348 100644
--- a/cmake/systemd.cmake
+++ b/cmake/systemd.cmake
@@ -61,7 +61,7 @@ MACRO(CHECK_SYSTEMD)
${INSTALL_SYSTEMD_UNITDIR}/mariadb@.service
${INSTALL_SYSTEMD_UNITDIR}/mariadb@bootstrap.service.d/wsrep-new-cluster.conf")
IF(DEB)
- SET(SYSTEMD_EXECSTARTPRE "PermissionsStartOnly=true\nExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld")
+ SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld")
SET(SYSTEMD_EXECSTARTPOST "ExecStartPost=/etc/mysql/debian-start")
ENDIF()
MESSAGE(STATUS "Systemd features enabled")