mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
do not put --user into command line if the value comes from [mysqld] or [server] sections
Bug #2163
This commit is contained in:
@ -46,8 +46,9 @@ parse_arguments() {
|
|||||||
--user=*)
|
--user=*)
|
||||||
if test $SET_USER -eq 0
|
if test $SET_USER -eq 0
|
||||||
then
|
then
|
||||||
user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1
|
user=`echo "$arg" | sed -e "s;--[^=]*=;;"`
|
||||||
fi
|
fi
|
||||||
|
SET_USER=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# these two might have been set in a [mysqld_safe] section of my.cnf
|
# these two might have been set in a [mysqld_safe] section of my.cnf
|
||||||
@ -129,7 +130,6 @@ fi
|
|||||||
# these rely on $DATADIR by default, so we'll set them later on
|
# these rely on $DATADIR by default, so we'll set them later on
|
||||||
pid_file=
|
pid_file=
|
||||||
err_log=
|
err_log=
|
||||||
SET_USER=0
|
|
||||||
|
|
||||||
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
|
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
|
||||||
# and then merge with the command line arguments
|
# and then merge with the command line arguments
|
||||||
@ -147,7 +147,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
args=
|
args=
|
||||||
parse_arguments `$print_defaults --loose-verbose $defaults mysqld server mysqld_safe safe_mysqld`
|
SET_USER=2
|
||||||
|
parse_arguments `$print_defaults --loose-verbose $defaults mysqld server`
|
||||||
|
if test $SET_USER -eq 2
|
||||||
|
then
|
||||||
|
SET_USER=0
|
||||||
|
fi
|
||||||
|
parse_arguments `$print_defaults --loose-verbose $defaults mysqld_safe safe_mysqld`
|
||||||
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
|
|
||||||
if test ! -x $ledir/$MYSQLD
|
if test ! -x $ledir/$MYSQLD
|
||||||
|
Reference in New Issue
Block a user