ldap_bind_ext allows to pass controls and get result object
from bind operation
Also added a test for it, pretty basic as tests cannot depend upon
ppolicy overlay
Note: for functions like ldap_compare, ldap_delete, ldap_modify,
a way to get the result object back will need to be added
so that controls returned by the server may be analyzed.
Also added workaround for a bug in ldap_create_assertion_control_value
Made sure failed control creation aborts the operation
And added test for assertion control on ldap_modify
Client controls will not get implemented in php-ldap as
they are specific to each client ldap lib and most of the
time unused any way. (servers controls on the other end are used
and will get implemented)
This fixes an regression introduced in
e7af0fe1eb. Previously, calling
ldap_connect() with no parameters would pass NULL to ldap_init(),
which causes it to use the default host specified in
/etc/ldap/ldap.conf (on Ubuntu).
When the code changed to use ldap_initialize(), it initialized a uri,
even if there were no parameters passed to ldap_connect(). Because of
this, there's no way to pass a NULL into ldap_initialize(), making it
impossible to use the default uri from ldap.conf.
This commit bypasses the uri creation when there is no host argument,
passing on a NULL to ldap_initialize() which restores the old PHP 5.5
behavior.
* PHP-7.0:
ext/ldap/test: Test that ldap_connect() uses defaults from ldap.conf (openldap)
ext/ldap: Allow default host from ldap.conf to work.
Conflicts:
ext/ldap/ldap.c
This fixes an regression introduced in
e7af0fe1eb. Previously, calling
ldap_connect() with no parameters would pass NULL to ldap_init(),
which causes it to use the default host specified in
/etc/ldap/ldap.conf (on Ubuntu).
When the code changed to use ldap_initialize(), it initialized a uri,
even if there were no parameters passed to ldap_connect(). Because of
this, there's no way to pass a NULL into ldap_initialize(), making it
impossible to use the default uri from ldap.conf.
This commit bypasses the uri creation when there is no host argument,
passing on a NULL to ldap_initialize() which restores the old PHP 5.5
behavior.