ports/databases/mysql323-server/files/patch-ag
Martin Blapp ced2bcb792 Security update to 3.23.58.
Fixed buffer overflow in password handling which could potentially
be exploited by MySQL users with ALTER privilege on the mysql.user
table to execute random code or to gain shell access with the UID
of the mysqld process.

The complete changelog can be found at:
http://www.mysql.com/doc/en/News-3.23.58.html

Approved by:	marcus (portsmgr)
2003-09-19 14:47:59 +00:00

177 lines
5.1 KiB
Text

--- configure.orig Thu Sep 11 13:49:33 2003
+++ configure Fri Sep 19 16:37:59 2003
@@ -8070,6 +8070,7 @@
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8999,7 +9000,7 @@
;;
esac
fi
-HOSTNAME=$ac_cv_path_HOSTNAME
+HOSTNAME="$ac_cv_path_HOSTNAME -s"
if test -n "$HOSTNAME"; then
echo "$as_me:$LINENO: result: $HOSTNAME" >&5
@@ -9188,43 +9189,7 @@
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:$LINENO: checking \"how to check if pid exists\"" >&5
-echo $ECHO_N "checking \"how to check if pid exists\"... $ECHO_C" >&6
-PS=$ac_cv_path_PS
-# Linux style
-if $PS p $$ 2> /dev/null | grep $0 > /dev/null
-then
- FIND_PROC="$PS p \$\$PID | grep mysqld > /dev/null"
-# Solaris
-elif $PS -p $$ 2> /dev/null | grep $0 > /dev/null
-then
- FIND_PROC="$PS -p \$\$PID | grep mysqld > /dev/null"
-# BSD style
-elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
-then
- FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
-# SysV style
-elif $PS -ef 2> /dev/null | grep $0 > /dev/null
-then
- FIND_PROC="$PS -ef | grep mysqld | grep \" \$\$PID \" > /dev/null"
-# Do anybody use this?
-elif $PS $$ 2> /dev/null | grep $0 > /dev/null
-then
- FIND_PROC="$PS \$\$PID | grep mysqld > /dev/null"
-else
- case $SYSTEM_TYPE in
- *darwin*)
- FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
- ;;
- *cygwin*)
- FIND_PROC="$PS -e | grep mysqld | grep \" \$\$PID \" > /dev/null"
- ;;
- *)
- { { echo "$as_me:$LINENO: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." >&5
-echo "$as_me: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." >&2;}
- { (exit 1); exit 1; }; }
- esac
-fi
+FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
echo "$as_me:$LINENO: result: \"$FIND_PROC\"" >&5
echo "${ECHO_T}\"$FIND_PROC\"" >&6
@@ -12509,8 +12474,16 @@
;;
*freebsd*)
echo "Adding fix for interrupted reads"
- CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
- CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
+ OSVERSION=`/sbin/sysctl -a | /usr/bin/grep osreldate | /usr/bin/awk '{ print $2 }'`
+ if test "$OSVERSION" -gt "480100" && \
+ test "$OSVERSION" -lt "500000" || \
+ test "$OSVERSION" -gt "500109"
+ then
+ CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
+ else
+ CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
+ CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
+ fi
;;
*netbsd*)
echo "Adding flag -Dunix"
@@ -13215,7 +13188,6 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
@@ -13269,7 +13241,6 @@
#define HAVE_LIBC_R 1
_ACEOF
- LIBS="-lc_r $LIBS"
fi
@@ -13713,29 +13684,6 @@
fi
-# Build optimized or debug version ?
-# First check for gcc and g++
-if test "$ac_cv_c_compiler_gnu" = "yes"
-then
- DEBUG_CFLAGS="-g"
- DEBUG_OPTIMIZE_CC="-O"
- OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
-else
- DEBUG_CFLAGS="-g"
- DEBUG_OPTIMIZE_CC=""
- OPTIMIZE_CFLAGS="-O"
-fi
-if test "$ac_cv_prog_cxx_g" = "yes"
-then
- DEBUG_CXXFLAGS="-g"
- DEBUG_OPTIMIZE_CXX="-O"
- OPTIMIZE_CXXFLAGS="-O3"
-else
- DEBUG_CXXFLAGS="-g"
- DEBUG_OPTIMIZE_CXX=""
- OPTIMIZE_CXXFLAGS="-O"
-fi
-
# Check whether --with-debug or --without-debug was given.
if test "${with_debug+set}" = set; then
@@ -16088,10 +16036,6 @@
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test "$ac_cv_cxx_compiler_gnu" = "yes"
-then
- CXXFLAGS="$CXXFLAGS -Werror"
-fi
mysql_cv_btype_last_arg_accept=none
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
@@ -19229,14 +19173,6 @@
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-# Do not treat warnings as errors if we are linking against other libc
-# this is to work around gcc not being permissive on non-system includes
-# with respect to ANSI C++
-if test "$ac_cv_cxx_compiler_gnu" = "yes" -a "$with_other_libc" = "no"
-then
- CXXFLAGS="$CXXFLAGS -Werror"
-fi
-
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
@@ -19320,10 +19256,6 @@
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test "$ac_cv_cxx_compiler_gnu" = "yes" -a "$with_other_libc" = "no"
-then
- CXXFLAGS="$CXXFLAGS -Werror"
-fi
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
@@ -19406,10 +19338,6 @@
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test "$ac_cv_cxx_compiler_gnu" = "yes" -a "$with_other_libc" = "no"
-then
- CXXFLAGS="$CXXFLAGS -Werror"
-fi
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"