Fix for libxcrypt - do not assume "crypt()" function is provided by glibc; #1536881

This commit is contained in:
Michal Schorm 2018-01-22 02:13:00 +01:00
parent 181a715390
commit 9afcfe2eb0
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,38 @@
Do not assume, that "crypt" function is provided by glibc; #1536881
--- mysql-5.7.21/include/my_global.h 2017-12-28 04:46:26.000000000 +0100
+++ mysql-5.7.21/include/my_global.h_patched 2018-01-22 01:01:42.450315852 +0100
@@ -49,6 +49,9 @@
#include <time.h>
#include <errno.h> /* Recommended by debian */
#include <sys/types.h>
+#if defined(HAVE_CRYPT_H)
+#include <crypt.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
--- mysql-5.7.21/configure.cmake 2017-12-28 04:46:26.000000000 +0100
+++ mysql-5.7.21/configure.cmake_patched 2018-01-22 01:00:09.955057755 +0100
@@ -493,6 +493,7 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMA
CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H)
CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) # Used by libedit
CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_SASL_H) # Used by memcached
+CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
# For libevent
CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_DEVPOLL)
--- mysql-5.7.21/config.h.cmake 2017-12-28 04:46:26.000000000 +0100
+++ mysql-5.7.21/config.h.cmake_patched 2018-01-22 01:51:02.522570765 +0100
@@ -62,6 +62,7 @@
#cmakedefine HAVE_SYS_UN_H 1
#cmakedefine HAVE_VIS_H 1
#cmakedefine HAVE_SASL_SASL_H 1
+#cmakedefine HAVE_CRYPT_H 1
/* Libevent */
#cmakedefine HAVE_DEVPOLL 1

View File

@ -134,6 +134,7 @@ Patch52: %{pkgnamepatch}-sharedir.patch
Patch70: %{pkgnamepatch}-5.7.9-major.patch
Patch71: %{pkgnamepatch}-openssl11.patch
Patch72: %{pkgnamepatch}-tirpc.patch
Patch73: %{pkgnamepatch}-libxcrypt.patch
# Patches taken from boost 1.59
Patch115: boost-1.58.0-pool.patch
@ -421,6 +422,7 @@ by any other package than mysql-connector-odbc.
%endif
%patch71 -p1
%patch72 -p1
%patch73 -p1
# Patch Boost
pushd boost/boost_1_59_0
@ -994,6 +996,8 @@ fi
- Add support for libtirpc
- Fix for various CVEs listed on
http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html
- Add fix for libxcrypt - do not assume "crypt()" function is provided by glibc
Resolves: #1536881
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 5.7.20-5
- Rebuilt for switch to libxcrypt