diff options
author | taca <taca@pkgsrc.org> | 2015-11-29 11:25:53 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2015-11-29 11:25:53 +0000 |
commit | 79f3f32560b1eb833ea00c618d5cd9cf1bf3102a (patch) | |
tree | a2dc2760a9dbe6c8a25c677d6bf8d23e8bcc59ae /databases | |
parent | 9387168dbcbf9a93c0bdd652fca0f7af0c7ffeaf (diff) | |
download | pkgsrc-79f3f32560b1eb833ea00c618d5cd9cf1bf3102a.tar.gz |
Allow work on PHP 5.5/5.6. Patch is based on patch
on https://bugzilla.redhat.com/show_bug.cgi?id=974928.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/phpldapadmin/Makefile | 4 | ||||
-rw-r--r-- | databases/phpldapadmin/distinfo | 4 | ||||
-rw-r--r-- | databases/phpldapadmin/patches/patch-lib_ds__ldap.php | 24 | ||||
-rw-r--r-- | databases/phpldapadmin/patches/patch-lib_functions.php | 51 |
4 files changed, 79 insertions, 4 deletions
diff --git a/databases/phpldapadmin/Makefile b/databases/phpldapadmin/Makefile index 40dee73d6dd..e58e7195947 100644 --- a/databases/phpldapadmin/Makefile +++ b/databases/phpldapadmin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2015/03/24 16:34:12 fhajny Exp $ +# $NetBSD: Makefile,v 1.39 2015/11/29 11:25:53 taca Exp $ DISTNAME= phpldapadmin-${VERSION} PKGREVISION= 1 @@ -11,8 +11,6 @@ HOMEPAGE= http://phpldapadmin.sourceforge.net/ COMMENT= Set of PHP-scripts to administer an LDAP directory over the WWW LICENSE= gnu-gpl-v2 -PHP_VERSIONS_ACCEPTED= 54 - .include "../../mk/bsd.prefs.mk" .include "../../lang/php/phpversion.mk" diff --git a/databases/phpldapadmin/distinfo b/databases/phpldapadmin/distinfo index 96c2e7c90cc..20198db6f3f 100644 --- a/databases/phpldapadmin/distinfo +++ b/databases/phpldapadmin/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.15 2015/11/03 01:56:25 agc Exp $ +$NetBSD: distinfo,v 1.16 2015/11/29 11:25:53 taca Exp $ SHA1 (phpldapadmin-1.2.3.tgz) = 669fca66c75e24137e106fdd02e3832f81146e23 RMD160 (phpldapadmin-1.2.3.tgz) = 0d170a1da26836b8c9af3c3a06960cfc42f29b26 SHA512 (phpldapadmin-1.2.3.tgz) = 58a57ca577586685ebd0d7fde7e299b8945d1693018c7803e19239b79f4b9d72a4d207d53c9f284268e32398108038efafcdb434e634619bfe87db3524d267b6 Size (phpldapadmin-1.2.3.tgz) = 1115707 bytes +SHA1 (patch-lib_ds__ldap.php) = 55563684fba16c1fbebbfa88ff1ce506f6c947fc +SHA1 (patch-lib_functions.php) = 3d83f5fe56ba9d908ef6b55028483b0fc7764b29 diff --git a/databases/phpldapadmin/patches/patch-lib_ds__ldap.php b/databases/phpldapadmin/patches/patch-lib_ds__ldap.php new file mode 100644 index 00000000000..1b2b8632e95 --- /dev/null +++ b/databases/phpldapadmin/patches/patch-lib_ds__ldap.php @@ -0,0 +1,24 @@ +$NetBSD: patch-lib_ds__ldap.php,v 1.1 2015/11/29 11:25:53 taca Exp $ + +Fix for PHP 5.5 and later: + https://bugzilla.redhat.com/show_bug.cgi?id=974928 + +--- lib/ds_ldap.php.orig 2012-10-01 06:54:14.000000000 +0000 ++++ lib/ds_ldap.php +@@ -1117,12 +1117,14 @@ class ldap extends DS { + if (is_array($dn)) { + $a = array(); + foreach ($dn as $key => $rdn) +- $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn); ++ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', ++ function ($matches) { return chr(hexdec($matches[1])); }, $rdn); + + return $a; + + } else +- return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn); ++ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', ++ function ($matches) { return chr(hexdec($matches[1])); }, $dn); + } + + public function getRootDSE($method=null) { diff --git a/databases/phpldapadmin/patches/patch-lib_functions.php b/databases/phpldapadmin/patches/patch-lib_functions.php new file mode 100644 index 00000000000..afd762baea2 --- /dev/null +++ b/databases/phpldapadmin/patches/patch-lib_functions.php @@ -0,0 +1,51 @@ +$NetBSD: patch-lib_functions.php,v 1.3 2015/11/29 11:25:53 taca Exp $ + +Fix for PHP 5.5 and later: + https://bugzilla.redhat.com/show_bug.cgi?id=974928 + +--- lib/functions.php.orig 2012-10-01 06:54:14.000000000 +0000 ++++ lib/functions.php +@@ -2127,7 +2127,7 @@ function password_types() { + * crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, sha512, or clear. + * @return string The hashed password. + */ +-function password_hash($password_clear,$enc_type) { ++function pla_password_hash($password_clear,$enc_type) { + if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) + debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs); + +@@ -2318,7 +2318,7 @@ function password_check($cryptedpassword + + # SHA crypted passwords + case 'sha': +- if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) ++ if (strcasecmp(pla_password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) + return true; + else + return false; +@@ -2327,7 +2327,7 @@ function password_check($cryptedpassword + + # MD5 crypted passwords + case 'md5': +- if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) ++ if( strcasecmp(pla_password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) + return true; + else + return false; +@@ -2565,12 +2565,14 @@ function dn_unescape($dn) { + $a = array(); + + foreach ($dn as $key => $rdn) +- $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn); ++ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', ++ function ($matches) { return chr(hexdec($matches[1])); }, $rdn ); + + return $a; + + } else { +- return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn); ++ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', ++ function ($matches) { return chr(hexdec($matches[1])); }, $dn); + } + } + |