mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
Deprecate ldap_connect with two parameters (#5177)
* Deprecate ldap_connect with two parameters ldap_connect should be called with an LDAP-URI as parameter and not with 2 parameters as that allows much more flexibility like differentiating between ldap and ldaps or setting multiple ldap-servers. This change requires one to add null as second parameter in case the underlying library is Oracle and one wants to add wallet-details. * Modify all ldap-tests to use ldap_connect right All tests are using ldap_connect now with an URI and not with host and port as two separarte parameters. * Verify deprecation of ldap_connect w/h 2 params This adds a test to verify that calling ldap_connect with 2 parameters triggers a deprecation notice * Remove empty test `ldap_control_paged_result()` is removed as of PHP 8.0.0, so this test needs to be removed as well. Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
This commit is contained in:
parent
3d944a367e
commit
69a8b63ecf
@ -926,6 +926,10 @@ PHP_FUNCTION(ldap_connect)
|
||||
ldap_linkdata *ld;
|
||||
LDAP *ldap = NULL;
|
||||
|
||||
if (ZEND_NUM_ARGS() == 2) {
|
||||
zend_error(E_DEPRECATED, "Usage of ldap_connect with two arguments is deprecated");
|
||||
}
|
||||
|
||||
#ifdef HAVE_ORALDAP
|
||||
if (ZEND_NUM_ARGS() == 3 || ZEND_NUM_ARGS() == 4) {
|
||||
WRONG_PARAM_COUNT;
|
||||
|
@ -12,7 +12,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -35,7 +35,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -5,7 +5,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
/* We are assuming 3333 is not connectable */
|
||||
$ldap = ldap_connect('127.0.0.1', 3333);
|
||||
$ldap = ldap_connect('ldap://127.0.0.1:3333');
|
||||
|
||||
ldap_mod_replace($ldap, '', array(
|
||||
'lockoutTime' => array(0),
|
||||
|
@ -10,7 +10,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$mods = array(
|
||||
@ -37,7 +37,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -7,6 +7,7 @@ Change the LDAP_TEST_* environment values if you want to use another configurati
|
||||
|
||||
$host = getenv("LDAP_TEST_HOST") ?: "localhost";
|
||||
$port = getenv("LDAP_TEST_PORT") ?: 389;
|
||||
$uri = getenv("LDAP_TEST_URI") ?: 'ldap://localhost:389';
|
||||
$base = getenv("LDAP_TEST_BASE") ?: "dc=my-domain,dc=com";
|
||||
$user = getenv("LDAP_TEST_USER") ?: "cn=Manager,$base";
|
||||
$passwd = getenv("LDAP_TEST_PASSWD") ?: "secret";
|
||||
@ -15,15 +16,15 @@ $sasl_passwd = getenv("LDAP_TEST_SASL_PASSWD") ?: "oops";
|
||||
$protocol_version = getenv("LDAP_TEST_OPT_PROTOCOL_VERSION") ?: 3;
|
||||
$skip_on_bind_failure = getenv("LDAP_TEST_SKIP_BIND_FAILURE") ?: true;
|
||||
|
||||
function ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version) {
|
||||
$link = ldap_connect($host, $port);
|
||||
function ldap_connect_and_bind($uri, $user, $passwd, $protocol_version) {
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
ldap_bind($link, $user, $passwd);
|
||||
return $link;
|
||||
}
|
||||
|
||||
function test_bind($host, $port, $user, $passwd, $protocol_version) {
|
||||
$link = ldap_connect($host, $port);
|
||||
function test_bind($uri, $user, $passwd, $protocol_version) {
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
return ldap_bind($link, $user, $passwd);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
var_dump(
|
||||
ldap_add($link, "dc=my-domain,$base", array(
|
||||
@ -32,7 +32,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
var_dump(ldap_add($link, "$base", array()));
|
||||
|
||||
@ -86,7 +86,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -14,7 +14,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_POST_READ);
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
var_dump(
|
||||
$result = ldap_add_ext($link, "o=test_ldap_add_ext,$base", array(
|
||||
@ -37,7 +37,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
ldap_delete($link, "o=test_ldap_add_ext,$base");
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
var_dump(ldap_bind($link));
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
|
||||
// Invalid password
|
||||
|
@ -14,7 +14,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_PASSWORDPOLICYREQUEST);
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
|
||||
var_dump(
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
var_dump(ldap_bind($link, $user, $passwd));
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
var_dump(
|
||||
ldap_compare($link, "cn=userA,$base", "sn", "testSN1"),
|
||||
@ -22,7 +22,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
var_dump(
|
||||
@ -24,7 +24,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
var_dump($link);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -15,8 +15,8 @@ require "connect.inc";
|
||||
var_dump(ldap_connect("ldap://$host:$port/$base"));
|
||||
|
||||
$links = array();
|
||||
$links[0] = ldap_connect($host, $port);
|
||||
$links[1] = ldap_connect($host, $port);
|
||||
$links[0] = ldap_connect($uri);
|
||||
$links[1] = ldap_connect($uri);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: ldap_connect(): Could not create session handle: %s in %s on line %d
|
||||
|
@ -15,7 +15,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_VALUESRETURNFILTER);
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
/* Test assertion control */
|
||||
@ -55,7 +55,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(objectclass=person)");
|
||||
var_dump(ldap_count_entries($link, $result));
|
||||
@ -20,7 +20,7 @@ var_dump(ldap_count_entries($link, $result));
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_add($link, "cn=userref,$base", array(
|
||||
"objectClass" => array("extensibleObject", "referral"),
|
||||
@ -27,7 +27,7 @@ var_dump(ldap_count_references($link, $result));
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
// Referral can only be removed with Manage DSA IT Control
|
||||
ldap_delete($link, "cn=userref,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
|
||||
ldap_delete($link, "cn=userref2,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
ldap_add($link, "dc=my-domain,$base", array(
|
||||
"objectClass" => array(
|
||||
"top",
|
||||
@ -30,7 +30,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
@ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
// Invalid DN
|
||||
var_dump(
|
||||
@ -31,7 +31,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: ldap_delete(): Delete: Invalid DN syntax in %s on line %d
|
||||
|
@ -14,7 +14,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_PRE_READ);
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
ldap_add($link, "dc=my-domain,$base", array(
|
||||
"objectClass" => array(
|
||||
"top",
|
||||
@ -39,7 +39,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
@ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
ldap_connect() - With two parameters is marked as deprecated
|
||||
--EXTENSIONS--
|
||||
ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
ldap_connect('foobar', 123);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Usage of ldap_connect with two arguments is deprecated in %s on line %d
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
@ldap_add($link, "badDN $base", array(
|
||||
"objectClass" => array(
|
||||
"top",
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
@ldap_add($link, "badDN $base", array(
|
||||
"objectClass" => array(
|
||||
"top",
|
||||
|
@ -10,7 +10,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
function build_reqdata_passwd($user, $oldpw, $newpw)
|
||||
@ -46,19 +46,19 @@ var_dump(
|
||||
$r = ldap_exop($link, LDAP_EXOP_WHO_AM_I),
|
||||
ldap_parse_exop($link, $r, $retdata2),
|
||||
$retdata2,
|
||||
test_bind($host, $port, "cn=userA,$base", $userAPassword, $protocol_version),
|
||||
test_bind($uri, "cn=userA,$base", $userAPassword, $protocol_version),
|
||||
$r = ldap_exop($link, LDAP_EXOP_MODIFY_PASSWD, build_reqdata_passwd("cn=userA,$base", $userAPassword, "")),
|
||||
ldap_parse_exop($link, $r, $retpwdata, $retpwoid),
|
||||
$genpw = extract_genpw($retpwdata),
|
||||
$retpwoid,
|
||||
test_bind($host, $port, "cn=userA,$base", $genpw, $protocol_version)
|
||||
test_bind($uri, "cn=userA,$base", $genpw, $protocol_version)
|
||||
);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -10,7 +10,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
// ldap_exop_passwd() allows to pass the DN, OLD and NEW passwords,
|
||||
@ -19,16 +19,16 @@ var_dump(
|
||||
$genpw = ldap_exop_passwd($link, "cn=userA,$base", "oops", "", $ctrls),
|
||||
$ctrls,
|
||||
$genpw = ldap_exop_passwd($link, "cn=userA,$base"),
|
||||
test_bind($host, $port, "cn=userA,$base", $genpw, $protocol_version),
|
||||
test_bind($uri, "cn=userA,$base", $genpw, $protocol_version),
|
||||
ldap_exop_passwd($link, "cn=userA,$base", $genpw, "newPassword"),
|
||||
test_bind($host, $port, "cn=userA,$base", "newPassword", $protocol_version)
|
||||
test_bind($uri, "cn=userA,$base", "newPassword", $protocol_version)
|
||||
);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -10,20 +10,20 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
var_dump(ldap_exop_passwd($link, "cn=userA,$base", "wrongPassword", "newPassword", $ctrls));
|
||||
var_dump($ctrls);
|
||||
var_dump(ldap_error($link));
|
||||
var_dump(ldap_errno($link));
|
||||
var_dump(test_bind($host, $port, "cn=userA,$base", "newPassword", $protocol_version));
|
||||
var_dump(test_bind($uri, "cn=userA,$base", "newPassword", $protocol_version));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--SKIPIF--
|
||||
<?php require_once('skipifbindfailure.inc'); ?>
|
||||
<?php
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
$r = ldap_read($link, '', 'objectClass=*', array('dynamicsubtrees'));
|
||||
$info = ldap_get_entries($link, $r)[0];
|
||||
if (!isset($info['dynamicsubtrees'])) {
|
||||
@ -18,7 +18,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_add($link, "cn=tmp,$base", array(
|
||||
@ -34,7 +34,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
ldap_delete($link, "cn=tmp,$base");
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -10,7 +10,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
var_dump(
|
||||
@ -21,7 +21,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(objectclass=organization)", array("objectClass"));
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -23,7 +23,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
try {
|
||||
var_dump(ldap_first_attribute($link, $link));
|
||||
} catch (TypeError $e) {
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(objectclass=person)");
|
||||
var_dump(
|
||||
@ -23,7 +23,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -10,7 +10,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_add($link, "cn=userref,$base", array(
|
||||
"objectClass" => array("extensibleObject", "referral"),
|
||||
@ -28,7 +28,7 @@ var_dump($refs);
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
// Referral can only be removed with Manage DSA IT Control
|
||||
ldap_delete($link, "cn=userref,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
|
||||
remove_dummy_data($link, $base);
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(objectclass=person)");
|
||||
var_dump(ldap_free_result($result));
|
||||
@ -20,7 +20,7 @@ var_dump(ldap_free_result($result));
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(o=test)");
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -23,7 +23,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(objectclass=organization)");
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -23,7 +23,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
var_dump(
|
||||
@ -25,7 +25,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
var_dump(
|
||||
@ -25,7 +25,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
$option = null;
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
|
||||
|
@ -12,7 +12,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
function build_ctrl_paged_value($int, $cookie)
|
||||
@ -63,7 +63,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
$result = ldap_get_option($link, LDAP_OPT_X_TLS_PACKAGE, $optionval);
|
||||
var_dump(in_array($optionval, ['GnuTLS', 'OpenSSL', 'MozNSS']));
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
$option = null;
|
||||
|
||||
$controls = array(
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(o=test)");
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -23,7 +23,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(objectclass=organization)");
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -22,7 +22,7 @@ var_dump(ldap_get_values_len($link, $entry, "inexistentAttribute"));
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
var_dump(
|
||||
$result = ldap_list($link, "$base", "(objectClass=person)"),
|
||||
@ -25,7 +25,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$entry = array(
|
||||
@ -30,7 +30,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
// DN not found
|
||||
var_dump(ldap_mod_add($link, "dc=my-domain,$base", array()));
|
||||
@ -44,7 +44,7 @@ var_dump(ldap_mod_add($link, "dc=my-domain,$base", $entry2));
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$entry = array(
|
||||
@ -30,7 +30,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
// DN not found
|
||||
var_dump(ldap_mod_del($link, "dc=my-domain,$base", array()));
|
||||
@ -26,7 +26,7 @@ var_dump(ldap_mod_del($link, "$base", array('dc')));
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
@ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -16,7 +16,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_POST_READ);
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$entry = array(
|
||||
@ -58,7 +58,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$entry = array(
|
||||
@ -30,7 +30,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
// DN not found
|
||||
var_dump(ldap_mod_replace($link, "dc=my-domain,$base", array()));
|
||||
@ -26,7 +26,7 @@ var_dump(ldap_mod_replace($link, "$base", array('dc')));
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: ldap_mod_replace(): Modify: No such object in %s on line %d
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$entry = array(
|
||||
@ -34,7 +34,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$mods = array(
|
||||
@ -42,7 +42,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
$addGivenName = array(
|
||||
array(
|
||||
@ -65,7 +65,7 @@ var_dump(ldap_modify_batch($link, "dc=my-domain,$base", $mods));
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
// DN not found
|
||||
var_dump(ldap_modify($link, "cn=not-found,$base", array()));
|
||||
@ -44,7 +44,7 @@ var_dump(ldap_modify($link, "dc=my-domain,$base", $entry2));
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
ldap_delete($link, "dc=my-domain,$base");
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(cn=userC)");
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -27,7 +27,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_search($link, "$base", "(objectclass=organization)");
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -23,7 +23,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
$result = ldap_list($link, "$base", "(objectClass=person)");
|
||||
$entry = ldap_first_entry($link, $result);
|
||||
@ -25,7 +25,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -10,7 +10,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_add($link, "cn=userref,$base", array(
|
||||
"objectClass" => array("extensibleObject", "referral"),
|
||||
@ -33,7 +33,7 @@ var_dump($refs);
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
// Referral can only be removed with Manage DSA IT Control
|
||||
ldap_delete($link, "cn=userref,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
|
||||
ldap_delete($link, "cn=userref2,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
|
||||
|
@ -14,7 +14,7 @@ require "connect.inc";
|
||||
|
||||
ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
|
||||
var_dump(@ldap_bind($link, $user, $passwd));
|
||||
|
@ -14,7 +14,7 @@ require "connect.inc";
|
||||
|
||||
ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_HARD);
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
|
||||
var_dump(@ldap_bind($link, $user, $passwd));
|
||||
|
@ -10,7 +10,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_add($link, "cn=userref,$base", array(
|
||||
"objectClass" => array("extensibleObject", "referral"),
|
||||
@ -30,7 +30,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
// Referral can only be removed with Manage DSA IT Control
|
||||
ldap_set_option($link, LDAP_OPT_SERVER_CONTROLS, array(array("oid" => "2.16.840.1.113730.3.4.2")));
|
||||
ldap_delete($link, "cn=userref,$base");
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_add($link, "cn=userref,$base", array(
|
||||
"objectClass" => array("extensibleObject", "referral"),
|
||||
@ -29,7 +29,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
// Referral can only be removed with Manage DSA IT Control
|
||||
ldap_delete($link, "cn=userref,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
|
||||
remove_dummy_data($link, $base);
|
||||
|
@ -14,7 +14,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_PAGEDRESULTS);
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -33,7 +33,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
var_dump(
|
||||
$result = ldap_read($link, "o=test,$base", "(o=*)"),
|
||||
@ -25,7 +25,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
var_dump(
|
||||
ldap_rename($link, "cn=userA,$base", "cn=userZ", "$base", true)
|
||||
@ -24,7 +24,7 @@ var_dump(ldap_get_entries($link, $result));
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
ldap_rename($link, "cn=userZ,$base", "cn=userA", "$base", true);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
var_dump(ldap_rename($link, "cn=userNotFound,$base", "cn=userZ", "$base", true));
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -15,7 +15,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_POST_READ);
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
var_dump(
|
||||
@ -38,7 +38,7 @@ var_dump(
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
ldap_rename($link, "cn=userZ,$base", "cn=userA", "$base", true);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php if (!function_exists("ldap_sasl_bind")) die("skip LDAP extension not compiled with SASL support"); ?>
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = @fsockopen($host, $port);
|
||||
$link = @fsockopen($uri);
|
||||
if (!$link) {
|
||||
die("skip no server listening");
|
||||
}
|
||||
@ -18,11 +18,11 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_unbind($link);
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
var_dump(ldap_sasl_bind($link, null, $sasl_passwd, 'DIGEST-MD5', 'realm', $sasl_user));
|
||||
?>
|
||||
@ -30,7 +30,7 @@ var_dump(ldap_sasl_bind($link, null, $sasl_passwd, 'DIGEST-MD5', 'realm', $sasl_
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -12,11 +12,11 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
ldap_unbind($link);
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
|
||||
// Invalid DN
|
||||
@ -37,7 +37,7 @@ var_dump(ldap_sasl_bind($link, "unexistingProperty=weirdValue,$user", $sasl_pass
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
insert_dummy_data($link, $base);
|
||||
var_dump(
|
||||
@ -26,7 +26,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
$dn = "dc=not-found,$base";
|
||||
$filter = "(dc=*)";
|
||||
|
@ -13,7 +13,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
ldap_set_option($link, LDAP_OPT_DEREF, LDAP_DEREF_SEARCHING);
|
||||
ldap_set_option($link, LDAP_OPT_SIZELIMIT, 123);
|
||||
ldap_set_option($link, LDAP_OPT_TIMELIMIT, 33);
|
||||
@ -39,7 +39,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_PAGEDRESULTS);
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -33,7 +33,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -15,7 +15,7 @@ skipifunsupportedcontrol(LDAP_CONTROL_VLVREQUEST);
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
/* First test with only SORT control */
|
||||
@ -75,7 +75,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -28,7 +28,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
var_dump(
|
||||
@ -26,7 +26,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -33,7 +33,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -28,7 +28,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -36,7 +36,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -14,7 +14,7 @@ require_once('skipifbindfailure.inc');
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
insert_dummy_data($link, $base);
|
||||
|
||||
$dn = "$base";
|
||||
@ -40,7 +40,7 @@ var_dump(
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
$option = null;
|
||||
|
||||
var_dump(ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version));
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
foreach([
|
||||
LDAP_OPT_X_TLS_CACERTDIR,
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
$result = ldap_set_option($link, LDAP_OPT_X_TLS_CIPHER_SUITE, '3DES');
|
||||
var_dump($result);
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_get_option($link, LDAP_OPT_X_TLS_PACKAGE, $package);
|
||||
if ($package != 'OpenSSL') {
|
||||
die("skip OpenSSL required for CRL check options, got: $package");
|
||||
@ -16,7 +16,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
foreach([
|
||||
LDAP_OPT_X_TLS_CRL_NONE,
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
$result = ldap_set_option($link, LDAP_OPT_X_TLS_CRLCHECK, 9001);
|
||||
var_dump($result);
|
||||
?>
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
$controls = array(
|
||||
array(
|
||||
array("xid" => "1.2.752.58.10.1", "iscritical" => true),
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
foreach([
|
||||
LDAP_OPT_X_KEEPALIVE_IDLE,
|
||||
|
@ -7,7 +7,7 @@ Edwin Hoksberg <edwin@edwinhoksberg.nl>
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
foreach([
|
||||
LDAP_OPT_X_TLS_NEVER,
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
$result = ldap_set_option($link, LDAP_OPT_X_TLS_REQUIRE_CERT, 9001);
|
||||
var_dump($result);
|
||||
?>
|
||||
|
@ -7,7 +7,7 @@ ldap
|
||||
--FILE--
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
foreach([
|
||||
LDAP_OPT_X_TLS_PROTOCOL_SSL2,
|
||||
|
@ -9,7 +9,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
$option = null;
|
||||
|
||||
$controls = array(
|
||||
|
@ -24,7 +24,7 @@ function rebind_proc ($ds, $ldap_url) {
|
||||
}
|
||||
}
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
var_dump(ldap_set_rebind_proc($link, "rebind_proc"));
|
||||
var_dump(ldap_set_rebind_proc($link, null));
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
die("skip ldap_set_rebind_proc() does not exist");
|
||||
}
|
||||
require "connect.inc";
|
||||
$link = @fsockopen($host, $port);
|
||||
$link = @fsockopen($uri);
|
||||
if (!$link) {
|
||||
die("skip no server listening");
|
||||
}
|
||||
@ -33,7 +33,7 @@ function rebind_proc ($ds, $ldap_url) {
|
||||
}
|
||||
}
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
try {
|
||||
$result = ldap_set_rebind_proc($link, "rebind_proc_inexistent");
|
||||
} catch(\TypeError $error) {
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
var_dump(ldap_start_tls($link));
|
||||
?>
|
||||
|
@ -11,7 +11,7 @@ ldap
|
||||
<?php
|
||||
require "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
var_dump(ldap_unbind($link));
|
||||
?>
|
||||
|
@ -24,7 +24,7 @@ function rebind_proc ($ds, $ldap_url) {
|
||||
}
|
||||
}
|
||||
|
||||
$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
ldap_set_rebind_proc($link, "rebind_proc");
|
||||
|
||||
var_dump(ldap_unbind($link));
|
||||
|
@ -3,7 +3,7 @@ require_once 'connect.inc';
|
||||
|
||||
if ($skip_on_bind_failure) {
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$link = ldap_connect($uri);
|
||||
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
|
||||
if (!@ldap_bind($link, $user, $passwd))
|
||||
die(sprintf("skip Can't bind to LDAP Server - [%d] %s", ldap_errno($link), ldap_error($link)));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user