diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-02 20:42:07 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-02 20:42:07 +0300 |
commit | 76ec780f0e731b297a487333c6a297456b6cd0c1 (patch) | |
tree | 5347a76b780d3917bc986c866ced057e7783b9d6 /scripts | |
parent | 1e97b27ee2b908a17c12962778b82237934a6b73 (diff) | |
download | mariadb-git-76ec780f0e731b297a487333c6a297456b6cd0c1.tar.gz |
Fix to not running mysqld as root by default
Docs/manual.texi:
Small changes for INNER JOIN
configure.in:
Use 'mysql' as the default MySQL user
myisam/mi_create.c:
Test for right create information
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/safe_mysqld.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh index 59d7dcc5cfc..e7418819604 100644 --- a/scripts/safe_mysqld.sh +++ b/scripts/safe_mysqld.sh @@ -31,7 +31,7 @@ parse_arguments() { --basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--[^=]*=;;"` ;; --datadir=*) DATADIR=`echo "$arg" | sed -e "s;--[^=]*=;;"` ;; --pid-file=*) pid_file=`echo "$arg" | sed -e "s;--[^=]*=;;"` ;; - --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ;; + --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;; # these two might have been set in a [safe_mysqld] section of my.cnf # they get passed via environment variables to safe_mysqld @@ -108,6 +108,7 @@ fi # these rely on $DATADIR by default, so we'll set them later on pid_file= err_log= +SET_USER=0 # Get first arguments from the my.cnf file, groups [mysqld] and [safe_mysqld] # and then merge with the command line arguments @@ -167,7 +168,10 @@ fi USER_OPTION="" if test -w / then - USER_OPTION="--user=$user" + if test "$user" != "root" -o $SET_USER = 1 + then + USER_OPTION="--user=$user" + fi # If we are root, change the err log to the right user. touch $err_log; chown $user $err_log if test -n "$open_files" |