6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/9/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#506] [PATCH] LDAP v3 Binds required
*
Your Email Address
*
Spam protection
Enter the letters below:
. . ..__. __.. , |_/ || |(__ \./ | \\__||__\.__) |
Comment
> Oops, I *hate* it when I mix patches together. > > > > Please use this patch instead. It modifies backends.php.dist to > include the variable to set the LDAP protocol version and removes the > references to the strip_domain configuration (thats ticket number > 507, oops). I also modified the variable name so that it is a bit > more clear which version we are specifying. > > ----- snip passwd-ldapv3.diff ----- > > diff -urN passwd-2.2.1/config/backends.php.dist > passwd/config/backends.php.dist > > --- passwd-2.2.1/config/backends.php.dist 2003-02-05 > 10:48:13.000000000 -0500 > > +++ passwd/config/backends.php.dist 2004-08-26 17:12:05.000000000 -0400 > > @@ -124,6 +124,7 @@ > > 'host' => 'localhost', > > 'port' => 389, > > 'basedn' => 'o=example.com', > > + 'protocol_version' => 3, > > 'uid' => 'uid', > > 'realm' => '', // this will be appended to the username when > > // looking for the userdn. > > diff -urN passwd-2.2.1/lib/Driver/ldap.php passwd/lib/Driver/ldap.php > > --- passwd-2.2.1/lib/Driver/ldap.php 2003-02-15 15:16:29.000000000 -0500 > > +++ passwd/lib/Driver/ldap.php 2004-08-26 17:13:00.000000000 -0400 > > @@ -34,6 +34,7 @@ > > $this->_params['basedn'] = array_key_exists('basedn', > $params) ? $params['basedn'] : ''; > > $this->_params['realm'] = array_key_exists('realm', > $params) ? $params['realm'] : ''; > > $this->_params['userdn'] = array_key_exists('userdn', > $params) ? $params['userdn'] : null; > > + $this->_params['protocol_version'] = > array_key_exists('protocol_version', $params) ? > $params['protocol_version'] : null; > > } > > > > /** > > @@ -47,6 +48,19 @@ > > */ > > function _connect($userdn = null, $password = null) { > > $this->_ds = ldap_connect($this->_params['host'], > $this->_params['port']); > > + /* Set the LDAP protocol version. */ > > + if (array_key_exists('protocol_version', $this->_params)) { > > + if (!ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, > > + $this->_params['protocol_version'])) { > > + Horde::logMessage( > > + sprintf('Set LDAP protocol version to %d failed: > [%d] %s', > > + $this->_params['protocol_version'], > > + ldap_errno($this->connection), > > + ldap_error($this->connection)), > > + __FILE__, __LINE__); > > + } > > + } > > + > > if (!$this->_ds) { > > return PEAR::raiseError(_("Could not connect to ldap server")); > > } > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers