summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2019-09-24 20:43:32 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2019-09-24 20:43:32 +0300
commit0e50ee6f28ca709c3ab8d143360faca182e74db4 (patch)
tree062d3b22b5521b73097c97637f0a2a8c968ea644
parent7ae290c75753d269fd6d10aa1b5f0c9bec1b7f2c (diff)
downloadmariadb-git-0e50ee6f28ca709c3ab8d143360faca182e74db4.tar.gz
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.
-rw-r--r--support-files/mariadb.service.in4
-rw-r--r--support-files/mariadb@.service.in5
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