SHA256
1
0
forked from pool/mariadb
Michal Hrusecky (old before rename to _miska_) 2010-09-29 10:48:13 +00:00 committed by Git OBS Bridge
parent e98a7596d7
commit a4034f8aba

View File

@ -280,12 +280,12 @@ else
# prepare tmp dir
if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
rm -rf "$TMPDIR"
fi
TMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`"
[ -z "$TMPDIR" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$TMPDIR"
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
echo "Can't create secure $TMPDIR"
rc_failed; rc_status -v; rc_exit;
}
@ -379,7 +379,7 @@ else
fi
protected="`mktemp -d -p /var/tmp mysql-protected.XXXXXX | tee /var/run/mysql/protecteddir`"
[ -z "$protected" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$protected"
[ "`ls -ld "$protected" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
[ "`ls -ld "$protected" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || {
echo "Can't create secure $protected" | tee -a "$log_upgrade"
rc_failed; rc_status -v; rc_exit;
}
@ -444,7 +444,7 @@ else
echo -n "Shutting down service MySQL "
kill_mysql
if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.+]?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
[ "`ls -ld "$TMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then
rm -rf "$TMPDIR"
fi
# Remember status and be verbose