openbsd-ports/databases/mariadb/patches/patch-scripts_mysql_install_db_sh
sthen 44084a5408 update to MariaDB 10.0.34, from Brad.
CVE-2018-2562, CVE-2018-2622, CVE-2018-2640, CVE-2018-2665, CVE-2018-2668,
CVE-2018-2612
2018-02-05 10:40:03 +00:00

62 lines
1.9 KiB
Plaintext

$OpenBSD: patch-scripts_mysql_install_db_sh,v 1.9 2018/02/05 10:40:03 sthen Exp $
Index: scripts/mysql_install_db.sh
--- scripts/mysql_install_db.sh.orig
+++ scripts/mysql_install_db.sh
@@ -29,7 +29,8 @@ args=""
defaults=""
defaults_group_suffix=""
mysqld_opt=""
-user=""
+user=_mysql
+group=_mysql
force=0
in_rpm=0
@@ -127,6 +128,8 @@ parse_arguments()
# as 'user' (crucial e.g. if log-bin=/some_other_path/
# where a chown of datadir won't help)
user=`parse_arg "$arg"` ;;
+ --group=*)
+ group=`parse_arg "$arg"` ;;
--skip-name-resolve) ip_only=1 ;;
--verbose) verbose=1 ;; # Obsolete
--rpm) in_rpm=1 ;;
@@ -396,11 +399,11 @@ do
fi
if test -n "$user"
then
- chown $user "$dir"
+ chown -f $user:$group "$dir"
if test $? -ne 0
then
- echo "Cannot change ownership of the database directories to the '$user'"
- echo "user. Check that you have the necessary permissions and try again."
+ echo "Cannot change ownership of the database directories to '$user:$group'"
+ echo "user/group. Check that you have the necessary permissions and try again."
exit 1
fi
fi
@@ -484,10 +487,6 @@ fi
# the screen.
if test "$cross_bootstrap" -eq 0 && test -z "$srcdir"
then
- s_echo
- s_echo "To start mysqld at boot time you have to copy"
- s_echo "support-files/mysql.server to the right place for your system"
-
echo
echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !"
echo "To do so, start the server, then issue the following commands:"
@@ -509,10 +508,7 @@ then
then
echo
echo "You can start the MariaDB daemon with:"
- echo "cd '$basedir' ; $bindir/mysqld_safe --datadir='$ldata'"
- echo
- echo "You can test the MariaDB daemon with mysql-test-run.pl"
- echo "cd '$basedir/mysql-test' ; perl mysql-test-run.pl"
+ echo "/etc/rc.d/mysqld start"
fi
echo