From 949559285efff44ba49b478ee766e0fe0a5a9b79 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 23 Jan 2019 10:09:49 +0100 Subject: MDEV-18059 `support-files/mysql.server.sh stop` must run as root don't run `su - mysql` is $USER is already mysql --- support-files/mysql.server.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'support-files') diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index c1d85ba2664..f3990967b87 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -187,7 +187,11 @@ fi user='@MYSQLD_USER@' su_kill() { - su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1 + if test "$USER" = "$user"; then + kill $* >/dev/null 2>&1 + else + su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1 + fi } # -- cgit v1.2.1 From 4aea6b3e3f3fd1a8a2526bc40fc5e85e571d8242 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Sat, 26 Jan 2019 01:11:45 +0100 Subject: MDEV-18379: Unification of check for IPv6 This patch contains the port of the MDEV-18379 patch for 10.1 branch, but also includes a number of changes made within MDEV-17835, which are necessary for the normal operation of tests that use IPv6: 1) Fixed flaws in the galera_3nodes mtr suite control scripts, because of which they could not work with mariabackup. 2) Fixed numerous bugs in the SST scripts and in the mtr test files (galera_3nodes mtr suite) that prevented the use of Galera with IPv6 addresses. 3) Fixed flaws in tests for rsync and mysqldump (for galera_3nodes mtr tests suite). These tests were not performed successfully without these fixes. 4) Currently, the three-node mtr suite for Galera (galera_3nodes) uses a separate IPv6 availability check using the "have_ipv6.inc" file. This check duplicates a more accurate check at suite.pm level, which can be used by including the file "check_ipv6.inc". This patch removes this discrepancy between suites. 5) GAL-501 test in the galera_3nodes suite does not contain the option "--bind-address=::" which is needed for the test to work correctly with IPv6 (at least on some systems), since without it the server will not wait for connections on the IPv6 interface. https://jira.mariadb.org/browse/MDEV-18379 and partially https://jira.mariadb.org/browse/MDEV-17835 --- support-files/policy/apparmor/usr.sbin.mysqld | 1 + support-files/policy/selinux/mariadb-server.fc | 1 + 2 files changed, 2 insertions(+) (limited to 'support-files') diff --git a/support-files/policy/apparmor/usr.sbin.mysqld b/support-files/policy/apparmor/usr.sbin.mysqld index 307872c0fff..a362aa78c7a 100644 --- a/support-files/policy/apparmor/usr.sbin.mysqld +++ b/support-files/policy/apparmor/usr.sbin.mysqld @@ -106,6 +106,7 @@ /usr/bin/wsrep_sst* rix, /usr/bin/wsrep_sst_common r, /usr/bin/xtrabackup* rix, + /usr/bin/mariabackup* rix, /var/lib/mysql/ r, /var/lib/mysql/** rw, /var/lib/mysql/*.log w, diff --git a/support-files/policy/selinux/mariadb-server.fc b/support-files/policy/selinux/mariadb-server.fc index 409f72923aa..39ec152c1ec 100644 --- a/support-files/policy/selinux/mariadb-server.fc +++ b/support-files/policy/selinux/mariadb-server.fc @@ -7,4 +7,5 @@ /var/lib/mysql/.*\.pid -- gen_context(system_u:object_r:mysqld_var_run_t,s0) /var/lib/mysql/.*\.cnf -- gen_context(system_u:object_r:mysqld_etc_t,s0) /usr/bin/xtrabackup.* -- gen_context(system_u:object_r:mysqld_exec_t,s0) +/usr/bin/mariabackup.* -- gen_context(system_u:object_r:mysqld_exec_t,s0) /usr/bin/wsrep.* -- gen_context(system_u:object_r:mysqld_safe_exec_t,s0) -- cgit v1.2.1