From 0e50ee6f28ca709c3ab8d143360faca182e74db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Tue, 24 Sep 2019 20:43:32 +0300 Subject: [PATCH] Remove --basedir arg from systemd startup scripts The arg was introduced as part of 75bcf1f9ad4a4bb5fa9cb8818abe6ace52e53d85 to fix a SELinux problem caused by mysqld_safe accessing files it should not be via the my_which function. The root cause for this was fixed in 10.3, via 355ee6877beccf27bcd07d845c985fc1a2845aca which eliminated the my_which function from mysqld_safe entirely. Thus, in 10.3, this --basedir flag is not necessary. --- support-files/mariadb.service.in | 4 +--- support-files/mariadb@.service.in | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in index e7976a8f3e2..1b1c9a5d592 100644 --- a/support-files/mariadb.service.in +++ b/support-files/mariadb.service.in @@ -86,9 +86,7 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \ # Use the [Service] section and Environment="MYSQLD_OPTS=...". # This isn't a replacement for my.cnf. # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug https://bugzilla.redhat.com/show_bug.cgi?id=547485 -ExecStart=@sbindir@/mysqld $MYSQLD_OPTS --basedir=@prefix@ $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION +ExecStart=@sbindir@/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION # Unset _WSREP_START_POSITION environment variable. ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION" diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in index 7a79a143778..185157a510d 100644 --- a/support-files/mariadb@.service.in +++ b/support-files/mariadb@.service.in @@ -103,12 +103,9 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \ # This isn't a replacement for my.cnf. # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug https://bugzilla.redhat.com/show_bug.cgi?id=547485 -# # Note: Place $MYSQLD_OPTS at the very end for its options to take precedence. -ExecStart=@sbindir@/mysqld --defaults-file=@sysconf2dir@/my%I.cnf --basedir=@prefix@ \ +ExecStart=@sbindir@/mysqld --defaults-file=@sysconf2dir@/my%I.cnf \ $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS # Alternate: (remove ConditionPathExists above) # use [mysqld.INSTANCENAME] as sections in my.cnf