diff options
Diffstat (limited to 'net-nds/phpldapadmin')
-rw-r--r-- | net-nds/phpldapadmin/Manifest | 9 | ||||
-rw-r--r-- | net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch | 23 | ||||
-rw-r--r-- | net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch | 152 | ||||
-rw-r--r-- | net-nds/phpldapadmin/files/postinstall2-en.txt | 4 | ||||
-rw-r--r-- | net-nds/phpldapadmin/metadata.xml | 18 | ||||
-rw-r--r-- | net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild | 48 | ||||
-rw-r--r-- | net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild | 44 |
7 files changed, 298 insertions, 0 deletions
diff --git a/net-nds/phpldapadmin/Manifest b/net-nds/phpldapadmin/Manifest new file mode 100644 index 000000000000..4ba2b51d7d76 --- /dev/null +++ b/net-nds/phpldapadmin/Manifest @@ -0,0 +1,9 @@ +AUX phpldapadmin-1.2.1.1-fix-magic-quotes.patch 829 SHA256 7cce069d30a5c4067743de8e91d0d6bd4d9faaaf169ed342a3890bf07ced8817 SHA512 64830cc864dbbe3d0aa72d0e1165b787287430f3ea7507c8e9df2115b03df73944c63a4e9c09a7f8c9a11d41f48327ee26c204ede3bae2209b0f47076d5587b3 WHIRLPOOL a539598b966e53b3df565711546adea1515621d015b3c1de4375a7d92735c56d551101d1cbfd0d216fdd843ad1311573cb4ac7867d175ecd8e8154da6fc1b794 +AUX phpldapadmin-fix-php5.5-support.patch 5157 SHA256 bc9c6ff55c4559007bfaf884ff34ce621de7ae27c4a82c89c6af36cab6b92003 SHA512 c0f990fea6e8f312d36f7eea754d3f4f1c2356a5e233c5df82fa1ce4b194d160ad40ce2ef85441f6686feecffae831770591e44cc67982bee63e870464da7f7b WHIRLPOOL 2b0a69d00246c6572e7f3f1974656bda2b91ae8bbe3c31470045943f9a65e35a5012baaf8c4dcc7668ea9401aa5ccb9ac9753a393997232916dc62b9169bba9e +AUX postinstall2-en.txt 131 SHA256 e2dc7bea366789a303eb9a90d1bced655cea00469202859af40bf19c00505d38 SHA512 f465adc204ef40675848e39e37bab3f2eb5054549e3b787953793ece683df84a52373d23383601b3c53c6b98bf8f1de83c6d83be117be9c00da7058763709d6b WHIRLPOOL 1903859baaaf44d93eaae4605878d282c8c7020cbab9e7b670b11716433dc5a6d70074ceec2a80533727e0e72c5f6325b03b65fab1bf8692684bd57dc9223b39 +DIST phpldapadmin-1.2.3.tgz 1115707 SHA256 aecaf8c3ce77ba3899dd31ee5ee183555b2f9349eb8e196dcd33d8a3c485ed58 SHA512 58a57ca577586685ebd0d7fde7e299b8945d1693018c7803e19239b79f4b9d72a4d207d53c9f284268e32398108038efafcdb434e634619bfe87db3524d267b6 WHIRLPOOL 2d8cf7dc9e3b509ed6884efa280e554aa34703ca829f377304b99ded20ad144ff445cae3630e83dbfdcccc83799a85a3a2301903a4e298faf0884d3201ca0d21 +EBUILD phpldapadmin-1.2.3-r1.ebuild 1388 SHA256 e0db8cdefbf76370ca43eb9fc43c3e12f8a338e1b33ced51adfefb5868490839 SHA512 794749faa522e41d2b50413528a04673c8678a236e90c723c1d11c9ea51d2da2a0e493516f11a817ab09faa002b9bf78bce597984a178fa837c7bec53f69e4d9 WHIRLPOOL 479b67933d914e7a7861fe5b85abf263924c33d141d21236d8388c951e28abd72a133665d1d302696421ac48c593d2e8efea6244ff2dbac30acd5067a20c4f0d +EBUILD phpldapadmin-1.2.3.ebuild 1145 SHA256 3e6483bf1d90be8d8de57b4ac013dd03a5d60c0f1243b7abab4e8ea93419d217 SHA512 f7a55503c5dba3e6e35b9110d4323a0d39d17920280902316742852670fbae567d8fa1a9ea8b93fc78fe62b92eb9c070b11d1d296535536b42cfea91d50cf248 WHIRLPOOL 921f9f9586c6789d4a63fd61ac3f2c174d8f1c8fbd08554da23b847eeb4602990fa8dc019e6cee0f70b88c6d6e1b4e3b1f309a15877e70b6b7fda95d02af713e +MISC ChangeLog 3620 SHA256 cd78269b22d5d6f3b26b97a15cb21c935442e6fdd71e127f8f7149399a70840d SHA512 398cc017af2be8e954089231f5f10b9c82e8ae7c1f1eeb11c6de1cfb8e02cbbc3001a7c11f285f693fc6a915399e8dda2cce388b8f10cab8e8f3101d2bbf594d WHIRLPOOL 0c852d9d621971e2de8a00ad9c99ce713e5e41f7f53e78b014b7eae25437b130b69dcdf09e95506f7a04a1e7ded56963354a7ac1faaf7a02c173a0b22f34e40e +MISC ChangeLog-2015 10556 SHA256 ffdfbf84549d0c895ca91f011e1400d453b1fd11248c41694176a695e08fe70d SHA512 2ec4378b55c710a183f9a11026959ffe79682e61c75b9f79960cf874a345bd3afb65997b5f439f4b9d3d27a90f11f36e7e2c0875702687d0808b6feea05f6c89 WHIRLPOOL 494fbeb8e6f34baf925e66f1725a68f5abe025ba255befac677791e4dd27ca5e346c4c528009d6bdc2a7bdf1e2a38b8996dffd62683f26774795f1cf4e549150 +MISC metadata.xml 593 SHA256 bf81811f8152e5f68740908489c6e0e48e1abade0023dfa4cb6e499debb2fa02 SHA512 76e19473a162674546562e71b893a1f4a076bae09998b7ad4136421d60c33b2c64ae32fd2d618128417b56437fc6ed1ae823f4642c8c4facd81a36e72a2451b3 WHIRLPOOL 27fd7b9a92b1c39ddbb9993230367a60209a5ada647914fb0ec8d609e8cc4403f2cb465ed53adc9de89e8b479e611e056f802eac05089264157a676ea1fcb466 diff --git a/net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch b/net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch new file mode 100644 index 000000000000..3a2f3a48223c --- /dev/null +++ b/net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch @@ -0,0 +1,23 @@ +diff -urN phpldapadmin-1.2.1.1/lib/emuhash_functions.php phpldapadmin-1.2.1.1-new/lib/emuhash_functions.php +--- phpldapadmin-1.2.1.1/lib/emuhash_functions.php 2011-05-11 09:40:18.000000000 +0000 ++++ phpldapadmin-1.2.1.1-new/lib/emuhash_functions.php 2011-10-20 15:55:05.597714125 +0000 +@@ -59,8 +59,8 @@ + global $emuhash_emu; + + if (PHP_VERSION < 6) { +- $current_magic_quotes = @get_magic_quotes_runtime(); +- @set_magic_quotes_runtime(0); ++ $current_magic_quotes = ini_get('magic_quotes_runtime'); ++ ini_set('magic_quotes_runtime', 0);; + } + + $tmpfile = tempnam($emuhash_emu['tmpdir'],'emuhash'); +@@ -78,7 +78,7 @@ + unlink($tmpfile); + + if (PHP_VERSION < 6) +- @set_magic_quotes_runtime($current_magic_quotes); ++ ini_set('magic_quotes_runtime', $current_magic_quotes); + + return $pass; + } diff --git a/net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch b/net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch new file mode 100644 index 000000000000..df6a7c163758 --- /dev/null +++ b/net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch @@ -0,0 +1,152 @@ +commit 7e53dab990748c546b79f0610c3a7a58431e9ebc +Author: Michael Laccetti <michael@laccetti.com> +Date: Thu Aug 29 09:13:56 2013 -0400 + + Fixed two issues to get phpLdapAdmin to work under PHP 5.5.x + 1) password_hash is an actual function, so renamed instances to password_hash_custom (HT: https://sourceforge.net/mailarchive/message.php?msg_id=31302386) + 2) Fixed the preg_replace to preg_replace_callback to use the /e/ functionality in the officially endorsed fashion + +diff --git a/lib/PageRender.php b/lib/PageRender.php +index 7d86a54..eed5d5f 100644 +--- a/lib/PageRender.php ++++ b/lib/PageRender.php +@@ -287,7 +287,7 @@ class PageRender extends Visitor { + break; + + default: +- $vals[$i] = password_hash($passwordvalue,$enc); ++ $vals[$i] = password_hash_custom($passwordvalue,$enc); + } + + $vals = array_unique($vals); +@@ -957,7 +957,7 @@ class PageRender extends Visitor { + if (trim($val)) + $enc_type = get_enc_type($val); + else +- $enc_type = $server->getValue('appearance','password_hash'); ++ $enc_type = $server->getValue('appearance','password_hash_custom'); + + $obfuscate_password = obfuscate_password_display($enc_type); + +@@ -982,7 +982,7 @@ class PageRender extends Visitor { + if (trim($val)) + $enc_type = get_enc_type($val); + else +- $enc_type = $server->getValue('appearance','password_hash'); ++ $enc_type = $server->getValue('appearance','password_hash_custom'); + + echo '<table cellspacing="0" cellpadding="0"><tr><td valign="top">'; + +diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php +index c346660..7532539 100644 +--- a/lib/ds_ldap.php ++++ b/lib/ds_ldap.php +@@ -1116,13 +1116,24 @@ 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); ++ foreach ($dn as $key => $rdn) { ++ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', ++ function ($m) { ++ return ''.chr(hexdec('\\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 ($m) { ++ return ''.chr(hexdec('\\1')).''; ++ }, ++ $dn ++ ); + } + + public function getRootDSE($method=null) { +diff --git a/lib/ds_ldap_pla.php b/lib/ds_ldap_pla.php +index 7ece393..6b0990e 100644 +--- a/lib/ds_ldap_pla.php ++++ b/lib/ds_ldap_pla.php +@@ -16,7 +16,7 @@ class ldap_pla extends ldap { + function __construct($index) { + parent::__construct($index); + +- $this->default->appearance['password_hash'] = array( ++ $this->default->appearance['password_hash_custom'] = array( + 'desc'=>'Default HASH to use for passwords', + 'default'=>'md5'); + +diff --git a/lib/functions.php b/lib/functions.php +index 56d8bf3..5ac3caf 100644 +--- a/lib/functions.php ++++ b/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 password_hash_custom($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,$plainpassword,$attribute='userpassword + + # SHA crypted passwords + case 'sha': +- if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) ++ if (strcasecmp(password_hash_custom($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) + return true; + else + return false; +@@ -2327,7 +2327,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword + + # MD5 crypted passwords + case 'md5': +- if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) ++ if( strcasecmp(password_hash_custom($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) + return true; + else + return false; +@@ -2392,7 +2392,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword + + # SHA512 crypted passwords + case 'sha512': +- if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) ++ if (strcasecmp(password_hash_custom($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) + return true; + else + return false; +@@ -2564,13 +2564,24 @@ function dn_unescape($dn) { + 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); ++ foreach ($dn as $key => $rdn) { ++ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', ++ function ($m) { ++ return ''.chr(hexdec('\\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 ($m) { ++ return ''.chr(hexdec('\\1')).''; ++ }, ++ $dn ++ ); + } + } + diff --git a/net-nds/phpldapadmin/files/postinstall2-en.txt b/net-nds/phpldapadmin/files/postinstall2-en.txt new file mode 100644 index 000000000000..005ead72e8d3 --- /dev/null +++ b/net-nds/phpldapadmin/files/postinstall2-en.txt @@ -0,0 +1,4 @@ +phpLDAPadmin is installed. You will need to +configure it by creating/editing the config file: + +${MY_INSTALLDIR}/config/config.php diff --git a/net-nds/phpldapadmin/metadata.xml b/net-nds/phpldapadmin/metadata.xml new file mode 100644 index 000000000000..79c647a9654e --- /dev/null +++ b/net-nds/phpldapadmin/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jmbsvicetto@gentoo.org</email> + <name>Jorge Manuel B. S. Vicetto</name> + </maintainer> + <maintainer type="project"> + <email>web-apps@gentoo.org</email> + <name>Gentoo Webapps</name> + </maintainer> + <longdescription> + phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server. +</longdescription> + <upstream> + <remote-id type="sourceforge">phpldapadmin</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild b/net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild new file mode 100644 index 000000000000..075a0159c130 --- /dev/null +++ b/net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils webapp + +DESCRIPTION="phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server" +HOMEPAGE="http://phpldapadmin.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86" +IUSE="" + +RDEPEND="dev-lang/php[hash,ldap,session,xml,nls] + || ( <dev-lang/php-5.3[pcre] >=dev-lang/php-5.3 ) + virtual/httpd-php" + +need_httpd_cgi + +src_prepare() { + mv config/config.php.example config/config.php + epatch "${FILESDIR}/${PN}-1.2.1.1-fix-magic-quotes.patch" + # http://phpldapadmin.git.sourceforge.net/git/gitweb.cgi?p=phpldapadmin/phpldapadmin;a=commit;h=7dc8d57d6952fe681cb9e8818df7f103220457bd + + epatch "${FILESDIR}/${PN}-fix-php5.5-support.patch" + # https://sourceforge.net/u/nihilisticz/phpldapadmin/ci/7e53dab990748c546b79f0610c3a7a58431e9ebc/ + # This patch has been requested to be merged, but there's no recent activity by upstream +} + +src_install() { + webapp_src_preinst + + dodoc INSTALL + + # Restrict config file access - bug 280836 + chown root:apache "config/config.php" + chmod 640 "config/config.php" + + insinto "${MY_HTDOCSDIR}" + doins -r * + + webapp_configfile "${MY_HTDOCSDIR}/config/config.php" + webapp_postinst_txt en "${FILESDIR}"/postinstall2-en.txt + + webapp_src_install +} diff --git a/net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild b/net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild new file mode 100644 index 000000000000..47ff7bff30dc --- /dev/null +++ b/net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils webapp + +DESCRIPTION="phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server" +HOMEPAGE="http://phpldapadmin.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86" +IUSE="" + +RDEPEND="dev-lang/php[hash,ldap,session,xml,nls] + || ( <dev-lang/php-5.3[pcre] >=dev-lang/php-5.3 ) + virtual/httpd-php" + +need_httpd_cgi + +src_prepare() { + mv config/config.php.example config/config.php + epatch "${FILESDIR}/${PN}-1.2.1.1-fix-magic-quotes.patch" + # http://phpldapadmin.git.sourceforge.net/git/gitweb.cgi?p=phpldapadmin/phpldapadmin;a=commit;h=7dc8d57d6952fe681cb9e8818df7f103220457bd +} + +src_install() { + webapp_src_preinst + + dodoc INSTALL + + # Restrict config file access - bug 280836 + chown root:apache "config/config.php" + chmod 640 "config/config.php" + + insinto "${MY_HTDOCSDIR}" + doins -r * + + webapp_configfile "${MY_HTDOCSDIR}/config/config.php" + webapp_postinst_txt en "${FILESDIR}"/postinstall2-en.txt + + webapp_src_install +} |