summaryrefslogtreecommitdiffstats
path: root/php-8.0.13-crypt.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-11-03 08:09:03 +0100
committerRemi Collet <remi@php.net>2021-11-03 08:09:03 +0100
commit6c4103d44dd1ad45f22f1f25e7f8072f21bea91b (patch)
tree1f31e988d9d541f79d58fd17c80e9074bff32fd4 /php-8.0.13-crypt.patch
parentf79d12de4e575c0fb81443e0411c0c38f86bdca8 (diff)
update to 8.0.13RC1
dba: enable qdbm backend dba: drop gdbm backend
Diffstat (limited to 'php-8.0.13-crypt.patch')
-rw-r--r--php-8.0.13-crypt.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/php-8.0.13-crypt.patch b/php-8.0.13-crypt.patch
new file mode 100644
index 0000000..31a8c8a
--- /dev/null
+++ b/php-8.0.13-crypt.patch
@@ -0,0 +1,45 @@
+From fc4e31467c352032ee709ac55d3c67bc22abcd8d Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 15 Oct 2021 17:11:12 +0200
+Subject: [PATCH] add --with-external-libcrypt build option display an error
+ message if some algo not available in external libcrypt
+
+---
+ ext/standard/config.m4 | 21 ++++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
+index 58b9c5e658a4..3ec18be4d7df 100644
+--- a/ext/standard/config.m4
++++ b/ext/standard/config.m4
+@@ -267,14 +267,25 @@ int main() {
+ ])])
+
+
++PHP_ARG_WITH([external-libcrypt],
++ [for external libcrypt or libxcrypt],
++ [AS_HELP_STRING([--with-external-libcrypt],
++ [Use external libcrypt or libxcrypt])],
++ [no],
++ [no])
++
+ dnl
+ dnl If one of them is missing, use our own implementation, portable code is then possible
+ dnl
+-dnl TODO This is currently always enabled
+-if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "$ac_cv_func_crypt_r" != "yes" || true; then
+- AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5])
+-
+- PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
++dnl This is currently enabled by default
++if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "$ac_cv_func_crypt_r" != "yes" || test "$PHP_EXTERNAL_LIBCRYPT" = "no"; then
++ if test "$PHP_EXTERNAL_LIBCRYPT" = "no"; then
++ AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5])
++
++ PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
++ else
++ AC_MSG_ERROR([Cannot use external libcrypt as some algo are missing])
++ fi
+ else
+ AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des])
+ fi