summaryrefslogtreecommitdiff
path: root/ext/ldap
diff options
context:
space:
mode:
authorCôme Chilliet <mcmic@php.net>2020-09-17 16:47:12 +0200
committerCôme Chilliet <mcmic@php.net>2020-09-29 16:31:07 +0200
commitcaa0cd7705a2d7154f2f1b478fea8ce6efc370d1 (patch)
tree1c1ea9e7039bb2c29dd3b3525b3babf5867f30bc /ext/ldap
parent74b634751b8957b30ce12601884ca4a8bc9067a8 (diff)
downloadphp-git-caa0cd7705a2d7154f2f1b478fea8ce6efc370d1.tar.gz
Set all parameters to ldap_sasl_bind as NULL by default
For mech, realm, authcid, authzid and props NULL means do not change current server setting.
Diffstat (limited to 'ext/ldap')
-rw-r--r--ext/ldap/ldap.c2
-rw-r--r--ext/ldap/ldap.stub.php2
-rw-r--r--ext/ldap/ldap_arginfo.h16
3 files changed, 10 insertions, 10 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index a43edd08a7..6a5f939878 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -1337,7 +1337,7 @@ PHP_FUNCTION(ldap_sasl_bind)
size_t rc, dn_len, passwd_len, mech_len, realm_len, authc_id_len, authz_id_len, props_len;
php_ldap_bictx *ctx;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|sssssss", &link, &binddn, &dn_len, &passwd, &passwd_len, &sasl_mech, &mech_len, &sasl_realm, &realm_len, &sasl_authc_id, &authc_id_len, &sasl_authz_id, &authz_id_len, &props, &props_len) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!s!s!s!s!s!", &link, &binddn, &dn_len, &passwd, &passwd_len, &sasl_mech, &mech_len, &sasl_realm, &realm_len, &sasl_authc_id, &authc_id_len, &sasl_authz_id, &authz_id_len, &props, &props_len) != SUCCESS) {
RETURN_THROWS();
}
diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php
index 243e57b142..a9ec590fe1 100644
--- a/ext/ldap/ldap.stub.php
+++ b/ext/ldap/ldap.stub.php
@@ -30,7 +30,7 @@ function ldap_bind_ext($link_identifier, string $bind_rdn = NULL, string $bind_p
#ifdef HAVE_LDAP_SASL
/** @param resource $link */
-function ldap_sasl_bind($link, string $binddn = UNKNOWN, string $password = UNKNOWN, string $sasl_mech = UNKNOWN, string $sasl_realm = UNKNOWN, string $sasl_authc_id = UNKNOWN, string $sasl_authz_id = UNKNOWN, string $props = UNKNOWN): bool {}
+function ldap_sasl_bind($link, string $binddn = NULL, string $password = NULL, string $sasl_mech = NULL, string $sasl_realm = NULL, string $sasl_authc_id = NULL, string $sasl_authz_id = NULL, string $props = NULL): bool {}
#endif
/**
diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h
index 24cb31304b..1a19ee0c2a 100644
--- a/ext/ldap/ldap_arginfo.h
+++ b/ext/ldap/ldap_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 4414873610a8b2099ddad28cbadd6b8d75f66431 */
+ * Stub hash: b4dc34ec9daecb904236e487fd4cf736f5f3fc44 */
#if defined(HAVE_ORALDAP)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
@@ -40,13 +40,13 @@ ZEND_END_ARG_INFO()
#if defined(HAVE_LDAP_SASL)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0)
ZEND_ARG_INFO(0, link)
- ZEND_ARG_TYPE_INFO(0, binddn, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, sasl_mech, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, sasl_realm, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, sasl_authc_id, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, sasl_authz_id, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, props, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, binddn, IS_STRING, 0, "NULL")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "NULL")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_mech, IS_STRING, 0, "NULL")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_realm, IS_STRING, 0, "NULL")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authc_id, IS_STRING, 0, "NULL")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sasl_authz_id, IS_STRING, 0, "NULL")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 0, "NULL")
ZEND_END_ARG_INFO()
#endif