Projects
Kolab:16:Testing
php-kolab-net-ldap3
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Difference Between Revision 2 and
Kolab:16
/
php-kolab-net-ldap3
View file
php-kolab-net-ldap3.spec
Changed
@@ -24,8 +24,8 @@ %else Name: php-kolab-net-ldap3 %endif -Version: 1.1.3 -Release: 1%{?dist} +Version: 1.0.4 +Release: 2%{?dist} Summary: Object oriented interface for searching and manipulating LDAP-entries Group: Development/Libraries License: GPLv3+ @@ -33,17 +33,16 @@ Source0: pear-Net-LDAP3-%{version}.tar.gz +Patch0001: 0001-Ensure-that-multi-valued-attributes-have-sequential-.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: mozldap-tools >= 6.0.5 Requires: php-ldap Requires: php-pear(Net_LDAP2) -%if 0%{?rhel} < 8 Obsoletes: php-pear(%{pear_name}) < %{version}-%{release} Provides: php-pear(%{pear_name}) = %{version}-%{release} -%endif -Obsoletes: php-Net-LDAP3 < %{version}-%{release} %description Net_LDAP3 is an LDAPv3 compatible enhancement to Net_LDAP2 @@ -51,6 +50,8 @@ %prep %setup -q -n pear-Net-LDAP3-%{version} +%patch0001 -p1 + %build %install @@ -73,28 +74,6 @@ %{_datadir}/%{php}/Net/LDAP3/Result.php %changelog -* Mon Oct 21 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 1.1.3-1 -- Release of version 1.1.3 - -* Sat Oct 19 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 1.1.2-1 -- Release of version 1.1.2 - -* Fri Aug 23 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 1.1.1-1 -- Release of version 1.1.1 - -* Wed Jun 5 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 1.1.0-1 -- Release of version 1.1.0 - -* Wed Jun 20 2018 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.0.7-1 -- Release of version 1.0.7 - -* Thu May 03 2018 Christoph Erhardt <kolab@sicherha.de> - 1.0.6-2 -- Fix upgrade path - -* Wed May 02 2018 Christoph Erhardt <kolab@sicherha.de> - 1.0.6-1 -- New upstream release 1.0.6 -- Add upstream patches - * Thu Oct 22 2015 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.0.4-2 - Ensure multi-valued attributes have sequential indexes
View file
0001-Ensure-that-multi-valued-attributes-have-sequential-.patch
Added
@@ -0,0 +1,26 @@ +From e049b764a5adbf14bd14df081e4ecd08d06bc678 Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Thu, 22 Oct 2015 11:20:19 +0200 +Subject: PATCH Ensure that multi-valued attributes have sequential indexes + in the array + +--- + lib/Net/LDAP3.php | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php +index a3e9f79..5ecce1e 100644 +--- a/lib/Net/LDAP3.php ++++ b/lib/Net/LDAP3.php +@@ -199,6 +199,8 @@ class Net_LDAP3 + foreach ($attributes as $attr_name => $attr_value) { + if (empty($attr_value)) { + unset($attributes$attr_name); ++ } else if (is_array($attr_value)) { ++ $attributes$attr_name = array_values($attr_value); + } + } + +-- +2.4.3 +
View file
debian.changelog
Changed
@@ -1,40 +1,3 @@ -php-net-ldap3 (1.1.3-1~kolab2) unstable; urgency=low - - * Release version 1.1.3 - - -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Mon, 21 Oct 2019 15:27:46 +0100 - -php-net-ldap3 (1.1.2-1~kolab1) unstable; urgency=low - - * Release version 1.1.2 - - -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Sat, 19 Oct 2019 15:27:46 +0100 - -php-net-ldap3 (1.1.1-1~kolab2) unstable; urgency=low - - * Release version 1.1.1 - - -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Fri, 23 Aug 2019 15:27:46 +0100 - -php-net-ldap3 (1.1.0-1~kolab2) unstable; urgency=low - - * Release version 1.1.0 - - -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 5 Jun 2019 15:27:46 +0100 - -php-net-ldap3 (1.0.7-1~kolab1) unstable; urgency=low - - * Release version 1.0.7 - - -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 20 Jun 2018 15:27:46 +0100 - -php-net-ldap3 (1.0.6-1~kolab1) unstable; urgency=low - - * Release version 1.0.6 - * Add upstream patches - - -- Christoph Erhardt <kolab@sicherha.de> Wed, 02 May 2018 21:53:23 +0200 - php-net-ldap3 (1.0.4-0~kolab2) unstable; urgency=low * Adjust dependencies for future Debian/Ubuntu releases
View file
debian.series
Changed
@@ -0,0 +1,1 @@ +0001-Ensure-that-multi-valued-attributes-have-sequential-.patch -p1
View file
pear-Net-LDAP3-1.1.3.tar.gz/composer.json -> pear-Net-LDAP3-1.0.4.tar.gz/composer.json
Changed
@@ -1,7 +1,8 @@ { - "name": "kolab/net_ldap3", + "name": "kolab/Net_LDAP3", "description": "A successor of the PEAR:Net_LDAP2 module providing advanced functionality for accessing LDAP directories", "type": "library", + "version": "1.0.4", "keywords": "pear", "ldap", "vlv", "homepage": "http://git.kolab.org/pear/Net_LDAP3/", "license": "GPL-3.0+", @@ -22,9 +23,15 @@ "role": "Developer" } , + "repositories": + { + "type": "pear", + "url": "http://pear.php.net/" + } + , "require": { "php": ">=5.3.3", - "pear/net_ldap2": ">=2.0.12" + "pear-pear/Net_LDAP2": ">=2.0.12" }, "autoload": { "classmap": "lib/"
View file
pear-Net-LDAP3-1.1.3.tar.gz/lib/Net/LDAP3.php -> pear-Net-LDAP3-1.0.4.tar.gz/lib/Net/LDAP3.php
Changed
@@ -41,11 +41,6 @@ */ class Net_LDAP3 { - const CONTROL_EFFECTIVE_RIGHTS = '1.3.6.1.4.1.42.2.27.9.5.2'; - const CONTROL_SORT_REQUEST = '1.2.840.113556.1.4.473'; - const CONTROL_VLV_REQUEST = '2.16.840.1.113730.3.4.9'; - const CONTROL_VLV_RESPONSE = '2.16.840.1.113730.3.4.10'; - public $conn; public $vlv_active = false; @@ -75,7 +70,6 @@ * 'use_tls' => false, * 'ldap_version' => 3, // using LDAPv3 * 'auth_method' => '', // SASL authentication method (for proxy auth), e.g. DIGEST-MD5 - * 'gssapi_cn' => null // Kerberos cache name (KRB5CCNAME) for SASL GSSAPI authentication * 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting * 'referrals' => false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups * 'network_timeout' => 10, // The timeout (in seconds) for connect + bind arrempts. This is only supported in PHP >= 5.3.0 with OpenLDAP 2.x @@ -88,9 +82,8 @@ * 'root_dn' => 'dc=example,dc=org', */ protected $config = array( - 'sizelimit' => 0, - 'timelimit' => 0, - 'config_root_dn' => 'cn=config', + 'sizelimit' => 0, + 'timelimit' => 0, ); protected $debug_level = false; @@ -119,29 +112,32 @@ protected $_current_bind_dn; protected $_current_bind_pw; protected $_current_host; - protected $_metadata; + protected $_supported_control = array(); protected $_vlv_indexes_and_searches; - /** * Constructor * - * @param array $config Configuration parameters. After initialization use - * the config_set() method. + * @param array $config Configuration parameters that have not already + * been initialized. For configuration parameters + * that have in fact been set, use the config_set() + * method after initialization. */ public function __construct($config = array()) { if (!empty($config) && is_array($config)) { foreach ($config as $key => $value) { - $setter = 'config_set_' . $key; - if (method_exists($this, $setter)) { - $this->$setter($value); - } - else if (isset($this->$key)) { - $this->$key = $value; - } - else { - $this->config$key = $value; + if (empty($this->config$key)) { + $setter = 'config_set_' . $key; + if (method_exists($this, $setter)) { + $this->$setter($value); + } + else if (isset($this->$key)) { + $this->$key = $value; + } + else { + $this->config$key = $value; + } } } } @@ -203,14 +199,12 @@ foreach ($attributes as $attr_name => $attr_value) { if (empty($attr_value)) { unset($attributes$attr_name); - } else if (is_array($attr_value)) { - $attributes$attr_name = array_values($attr_value); } } $this->_debug("C: Add $entry_dn: " . json_encode($attributes)); - if (!ldap_add($this->conn, $entry_dn, $attributes)) { + if (($add_result = @ldap_add($this->conn, $entry_dn, $attributes)) == false) { $this->_debug("S: " . ldap_error($this->conn)); $this->_warning("LDAP: Adding entry $entry_dn failed. " . ldap_error($this->conn)); @@ -278,24 +272,20 @@ $ldap->connect(); $ldap->bind($this->_current_bind_dn, $this->_current_bind_pw); - $attrs = array( - 'nsDS5ReplicaBindDN', - 'nsDS5ReplicaType', - 'nsds5ReplicaPurgeDelay', - 'nsDS5Flags' - ); - - $replica_attrs = $ldap->get_entry_attributes($replica_dn, $attrs); - $replica_attrs = array_merge((array) $replica_attrs, array( + $replica_attrs = array( 'cn' => 'replica', 'objectclass' => array( 'top', 'nsds5replica', 'extensibleobject', ), - 'nsDS5ReplicaId' => ($max_repl_id + $num + 1), - 'nsDS5ReplicaRoot' => $domain_root_dn, - )); + 'nsDS5ReplicaBindDN' => $ldap->get_entry_attribute($replica_dn, "nsDS5ReplicaBindDN"), + 'nsDS5ReplicaId' => ($max_repl_id + $num + 1), + 'nsDS5ReplicaRoot' => $domain_root_dn, + 'nsDS5ReplicaType' => $ldap->get_entry_attribute($replica_dn, "nsDS5ReplicaType"), + 'nsds5ReplicaPurgeDelay' => $ldap->get_entry_attribute($replica_dn, "nsds5ReplicaPurgeDelay"), + 'nsDS5Flags' => $ldap->get_entry_attribute($replica_dn, "nsDS5Flags") + ); $new_replica_dn = 'cn=replica,cn="' . $domain_root_dn . '",cn=mapping tree,cn=config'; @@ -695,16 +685,22 @@ return true; } - /** - * Gets effective rights of an ldap entry - */ public function effective_rights($subject) { - if (!in_array(self::CONTROL_EFFECTIVE_RIGHTS, $this->supported_controls())) { + $effective_rights_control_oid = "1.3.6.1.4.1.42.2.27.9.5.2"; + + $supported_controls = $this->supported_controls(); + + if (!in_array($effective_rights_control_oid, $supported_controls)) { $this->_debug("LDAP: No getEffectiveRights control in supportedControls"); return false; } + $attributes = array( + 'attributeLevelRights' => array(), + 'entryLevelRights' => array(), + ); + $entry_dn = $this->entry_dn($subject); if (!$entry_dn) { @@ -721,53 +717,6 @@ $this->_debug("effective_rights for subject $subject resolves to entry dn $entry_dn"); - if (PHP_VERSION_ID >= 70300) { - // Note: This get_entry() have to request all attributes to be working - $result = $this->get_entry($entry_dn, array('*'), array( - array( - 'oid' => self::CONTROL_EFFECTIVE_RIGHTS, - 'value' => 'dn:' . $this->_current_bind_dn, - 'iscritical' => true, - ), - )); - - if (!empty($result)) { - $attributes = array( - 'dn' => $entry_dn, - 'attributelevelrights' => array(), - 'entrylevelrights' => array(), - ); - - foreach (array('aclrights', 'attributelevelrights', 'entrylevelrights') as $attr_name) { - if ($attr_value = $result$attr_name) { - switch ($attr_name) { - case 'aclrights': - $this->parse_aclrights($attributes, $attr_value); - break; - case 'attributelevelrights': - $attributes$attr_name = $this->parse_attribute_level_rights($attr_value); - break; - case 'entrylevelrights': - $attributes$attr_name = $this->parse_entry_level_rights($attr_value); - break; - } - } - } - - $this->_debug("LDAP: Effective rights:" . var_export($attributes, true)); - - return $attributes; - } - - return false; - } - - // Use ldapsearch command
View file
pear-Net-LDAP3-1.1.3.tar.gz/lib/Net/LDAP3/Result.php -> pear-Net-LDAP3-1.0.4.tar.gz/lib/Net/LDAP3/Result.php
Changed
@@ -42,7 +42,6 @@ protected $base_dn; protected $filter; protected $scope; - protected $result; private $count; private $current; @@ -66,25 +65,15 @@ $this->result = $result; } - /** - * Property value getter - * - * @param string $property Property name - * @param mixed $default Return value if proprty is not set - * - * @return mixed Property value - */ public function get($property, $default = null) { - return isset($this->$property) ? $this->$property : $default; + if (isset($this->$property)) { + return $this->$property; + } else { + return $default; + } } - /** - * Property value setter - * - * @param string $property Property name - * @param mixed $value Property value - */ public function set($property, $value) { $this->$property = $value; @@ -92,22 +81,14 @@ /** * Wrapper for ldap_sort() - * - * @param string $attr The attribute to use as a key in the sort - * - * @return bool True on success, False on failure */ public function sort($attr) { - // @TODO: Don't use ldap_sort() it's deprecated since PHP7 - // and will be removed in future - return @ldap_sort($this->conn, $this->result, $attr); + return ldap_sort($this->conn, $this->result, $attr); } /** * Get entries count - * - * @return int Number of entries in the result */ public function count() { @@ -176,4 +157,5 @@ { return (bool)$this->current; } + }
View file
pear-Net-LDAP3-1.1.3.tar.gz/.arcconfig
Deleted
@@ -1,3 +0,0 @@ -{ - "phabricator.uri": "https://git.kolab.org" -}
View file
php-net-ldap3.dsc
Changed
@@ -2,7 +2,7 @@ Source: php-net-ldap3 Binary: php-net-ldap3 Architecture: all -Version: 1.1.3-1~kolab2 +Version: 1.0.4-0~kolab2 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Christoph Wickert <wickert@kolabsys.com> Homepage: http://kolab.org @@ -12,5 +12,5 @@ Package-List: php-net-ldap3 deb php optional Files: - 00000000000000000000000000000000 0 pear-Net-LDAP3-1.1.3.tar.gz + 00000000000000000000000000000000 0 pear-Net-LDAP3-1.0.4.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.