aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/mysql/mariadb/CVE-2016-6664_p2.patch
diff options
context:
space:
mode:
authorSunil Kumar <sukumar@mvista.com>2017-03-28 13:23:31 +0530
committerArmin Kuster <akuster808@gmail.com>2017-11-16 15:36:05 -0800
commit242345d61dfd1546a4371d3ddabdf1cb7baa69c2 (patch)
tree32400dd2ec2324e7c823b9d1f4070491a07ecf0c /meta-oe/recipes-support/mysql/mariadb/CVE-2016-6664_p2.patch
parentd3eef0b4716dac147f5f4d1bcdfc49021f698790 (diff)
downloadmeta-openembedded-contrib-akuster/morty-next.tar.gz
mariadb: Security fix for CVE-2016-6664akuster/morty-next
Source: https://github.com/MariaDB/server.git MR: 69290 Type: Security Fix Disposition: Backport from mariadb-5.5.54~4 ChangeID: 8fcdd6b0ecbb966f4479856efe93a963a7a422f7 Description: CVE-2016-6664 Signed-off-by: Sunil Kumar <sukumar@mvista.com> Reviewed-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/mysql/mariadb/CVE-2016-6664_p2.patch')
-rw-r--r--meta-oe/recipes-support/mysql/mariadb/CVE-2016-6664_p2.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mysql/mariadb/CVE-2016-6664_p2.patch b/meta-oe/recipes-support/mysql/mariadb/CVE-2016-6664_p2.patch
new file mode 100644
index 0000000000..3c466185b4
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/CVE-2016-6664_p2.patch
@@ -0,0 +1,58 @@
+From 7e4faa6aa71e84193a3fd9a40cfa6fca0c52d496 Mon Sep 17 00:00:00 2001
+From: Sergei Golubchik <serg@mariadb.org>
+Date: Thu, 29 Sep 2016 10:16:24 +0200
+Subject: [PATCH 2/3] mysqld_safe: close stdout and stderr
+
+when they're not needed anymore. Helps when
+daemonizing it from mysql.init
+
+Upstream-Status: Backport
+
+CVE: CVE-2016-6664 patch#2
+
+Signed-off-by: Sunil Kumar <sukumar@mvista.com>
+---
+ scripts/mysqld_safe.sh | 6 +++++-
+ support-files/mysql.server.sh | 2 +-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
+index 7f18abb3dc2..7cadce725d1 100644
+--- a/scripts/mysqld_safe.sh
++++ b/scripts/mysqld_safe.sh
+@@ -620,6 +620,10 @@ else
+ logging=syslog
+ fi
+
++# close stdout and stderr, everything goes to $logging now
++exec 1>&-
++exec 2>&-
++
+ USER_OPTION=""
+ if test -w / -o "$USER" = "root"
+ then
+@@ -650,7 +654,7 @@ if [ ! -d $mysql_unix_port_dir ]
+ then
+ if ! `mkdir -p $mysql_unix_port_dir`
+ then
+- echo "Fatal error Can't create database directory '$mysql_unix_port'"
++ log_error "Fatal error Can't create database directory '$mysql_unix_port'"
+ exit 1
+ fi
+ chown $user $mysql_unix_port_dir
+diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
+index e5c8814f930..d4fff33af13 100644
+--- a/support-files/mysql.server.sh
++++ b/support-files/mysql.server.sh
+@@ -308,7 +308,7 @@ case "$mode" in
+ then
+ # Give extra arguments to mysqld with the my.cnf file. This script
+ # may be overwritten at next upgrade.
+- $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null &
++ $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args &
+ wait_for_ready; return_value=$?
+
+ # Make lock for RedHat / SuSE
+--
+2.11.1
+