Skip to content

Commit 773d2d1

Browse files
committed
MDEV-36738: mariadb@.service incorrectly changing pam ownership in mariadb-install-db
It was mysql_install_db, and this is changed to mariadb-install-db. likewise changed all of the support-files references to mysql_install_db. This install script is part of the service as a useful instigation step, and a no-op in subseqeuent runs. This script does however change the auth_pam_tool_dir ownership. When running a multi-instance based on username, changing the auth_pam_tool_dir will only cause troubles for the other users. If you are running multiple instances on username is seems you are unlikely do be having pam access for all users. Even if you where the solution on auth_pam_tool_dir would be a group permission and group access based on the users. As such skip the changing of ownership.
1 parent 0680e31 commit 773d2d1

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

support-files/MacOSX/ReadMe.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Note
8080
lib Libraries
8181
man Unix manual pages
8282
mysql-test MySQL test suite
83-
scripts Contains the mysql_install_db script
83+
scripts Contains the mariadb-install-db script
8484
share/mysql Error message files
8585
sql-bench Benchmarks
8686
support-files Scripts and sample configuration files
@@ -288,7 +288,7 @@ Note
288288
/usr/libexec The mariadbd server
289289
/usr/share/man Unix manual pages
290290
/usr/share/mysql/mysql-test MySQL test suite
291-
/usr/share/mysql Contains the mysql_install_db script
291+
/usr/share/mysql Contains the mariadb-install-db script
292292
/var/mysql/mysql.sock The location of the MySQL Unix socket
293293

294294
Note

support-files/MacOSX/postflight.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
# installation has been performed.
2424
#
2525
# This script will install the MySQL privilege tables using the
26-
# "mysql_install_db" script and will correct the ownerships of these files
26+
# "mariadb-install-db" script and will correct the ownerships of these files
2727
# afterwards.
2828
#
2929

3030
if cd @prefix@ ; then
3131
if [ ! -f data/mysql/db.frm ] ; then
32-
./scripts/mysql_install_db --rpm
32+
./scripts/mariadb-install-db --rpm
3333
fi
3434

3535
if [ -d data ] ; then

support-files/binary-configure.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ for arg do
2323
esac
2424
done
2525

26-
if test ! -x ./scripts/mysql_install_db
26+
if test ! -x ./scripts/mariadb-install-db
2727
then
28-
echo "I didn't find the script './scripts/mysql_install_db'."
28+
echo "I didn't find the script './scripts/mariadb-install-db'."
2929
echo "Please execute this script in the mysql distribution directory!"
3030
exit 1;
3131
fi
@@ -38,7 +38,7 @@ echo "and start the MySQL server for you. If you run into any trouble, please"
3838
echo "consult the MySQL manual, that you can find in the Docs directory."
3939
echo ""
4040

41-
./scripts/mysql_install_db --no-defaults
41+
./scripts/mariadb-install-db --no-defaults
4242
if [ $? = 0 ]
4343
then
4444
echo "Starting the mariadbd server. You can test that it is up and running"

support-files/mariadb.service.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
8282
&& systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1"
8383

8484
# Needed to create system tables etc.
85-
# ExecStartPre=@scriptdir@/mysql_install_db -u mysql
85+
# ExecStartPre=@scriptdir@/mariadb-install-db -u mysql
8686

8787
# Start main service
8888
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf

support-files/mariadb@.service.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
# User=%I
8989
# ProtectHome=false
9090
# ExecStartPre=
91-
# ExecStartPre=@scriptdir@/mysql_install_db $MYSQLD_MULTI_INSTANCE \
91+
# ExecStartPre=@scriptdir@/mariadb-install-db $MYSQLD_MULTI_INSTANCE \
9292
# --auth-root-authentication-method=socket --auth-root-socket-user=%I
9393
# Environment=MYSQLD_MULTI_INSTANCE="--defaults-file=/home/%I/my%I.cnf \
9494
# --datadir=/home/%I/mysqldatadir --skip-networking --socket=@mysql-%I"
@@ -197,8 +197,8 @@ ProtectSystem=full
197197
# Prevent accessing /home, /root and /run/user
198198
ProtectHome=true
199199

200-
# Needed to create system tables etc.
201-
ExecStartPre=@scriptdir@/mysql_install_db $MYSQLD_MULTI_INSTANCE
200+
# Needed to create system tables etc. --rpm to not do pam permission changes.
201+
ExecStartPre=@scriptdir@/mariadb-install-db $MYSQLD_MULTI_INSTANCE --rpm
202202

203203
# Start main service
204204
# A few variables are here:

0 commit comments

Comments
 (0)