com php-src: Removed ldap_refresh function as I ’m not sure how to fix/use/test it: ext /ldap/config.m4 ext/ldap/config.w32 ext/ldap/ldap .c
| From: | Côme Bernigaud | Date: | Mon, 03 Jul 2017 08:58:13 +0000 |
| Subject: | com php-src: Removed ldap_refresh function as I ’m not sure how to fix/use/test it: ext /ldap/config.m4 ext/ldap/config.w32 ext/ldap/ldap .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98392@lists.php.net to get a copy of this message | ||
Commit: 4652c462452e1736e1f740e83e2cb2a492b27d13
Author: Côme Chilliet <mcmic@php.net> Mon, 26 Jun 2017 14:27:03 +0200
Parents: e832ce4b22c09dd753854183f03aa0a02c38cb47
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4652c462452e1736e1f740e83e2cb2a492b27d13
Log:
Removed ldap_refresh function as I’m not sure how to fix/use/test it
Changed paths:
M ext/ldap/config.m4
M ext/ldap/config.w32
M ext/ldap/ldap.c
Diff:
diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4
index 1d7c57a..f275c68 100644
--- a/ext/ldap/config.m4
+++ b/ext/ldap/config.m4
@@ -204,7 +204,7 @@ if test "$PHP_LDAP" != "no"; then
dnl Solaris 2.8 claims to be 2004 API, but doesn't have
dnl ldap_parse_reference() nor ldap_start_tls_s()
- AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find
ldap_parse_extended_result ldap_parse_passwd ldap_parse_whoami ldap_extended_operation
ldap_extended_operation_s ldap_passwd_s ldap_whoami_s ldap_refresh])
+ AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find
ldap_parse_extended_result ldap_parse_passwd ldap_parse_whoami ldap_extended_operation
ldap_extended_operation_s ldap_passwd_s ldap_whoami_s])
dnl
dnl SASL check
diff --git a/ext/ldap/config.w32 b/ext/ldap/config.w32
index 56e5dbc..20a31dd 100644
--- a/ext/ldap/config.w32
+++ b/ext/ldap/config.w32
@@ -27,7 +27,6 @@ if (PHP_LDAP != "no") {
AC_DEFINE('HAVE_LDAP_EXTENDED_OPERATION_S', 1);
AC_DEFINE('HAVE_LDAP_PASSWD_S', 1);
AC_DEFINE('HAVE_LDAP_WHOAMI_S', 1);
- AC_DEFINE('HAVE_LDAP_REFRESH', 1);
AC_DEFINE('HAVE_LDAP_EXTENDED_OPERATION', 1);
} else {
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index e541b35..a706c71 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -3549,56 +3549,6 @@ PHP_FUNCTION(ldap_exop_whoami)
/* }}} */
-#ifdef HAVE_LDAP_REFRESH
-/* {{{ proto ? ldap_refresh(resource link , string dn , int ttl, [int *newttl])
- DDS refresh extended operation */
-PHP_FUNCTION(ldap_refresh)
-{
- zval *link, *dn, *ttl, *newttl;
- struct berval ldn;
- ber_int_t lttl;
- ber_int_t lnewttl;
- ldap_linkdata *ld;
- LDAP *ldap;
- LDAPMessage *ldap_res;
- int rc, msgid, myargcount = ZEND_NUM_ARGS();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rzz|z", &link, &dn,
&ttl, &newttl) != SUCCESS) {
- WRONG_PARAM_COUNT;
- }
-
- if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) ==
NULL) {
- RETURN_FALSE;
- }
-
- ldn.bv_len = 0;
- convert_to_string_ex(dn);
- ldn.bv_val = Z_STRVAL_P(dn);
- ldn.bv_len = Z_STRLEN_P(dn);
-
- convert_to_long_ex(ttl);
- lttl = (ber_int_t)Z_LVAL_P(ttl);
-
- /* asynchronous call */
- rc = ldap_refresh_s(ld->link, &ldn, lttl, &lnewttl, NULL, NULL);
- if (rc != LDAP_SUCCESS ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING,
- "Refresh extended operation failed: %s (%d)",
- ldap_err2string(rc), rc);
- RETURN_FALSE;
- }
-
- if (myargcount == 4) {
- zval_dtor(newttl);
- ZVAL_LONG(newttl, (long)lnewttl);
- }
- RETURN_TRUE;
-}
-#else
-/* TODO: implement based on ldap_extended_operation_s() */
-/* }}} */
-#endif
-
/* {{{ arginfo */
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
ZEND_ARG_INFO(0, hostname)
@@ -3918,15 +3868,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_parse_exop_whoami, 0, 0, 3)
ZEND_ARG_INFO(1, authzid)
ZEND_END_ARG_INFO()
#endif
-
-#ifdef HAVE_LDAP_REFRESH
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_refresh, 0, 0, 4)
- ZEND_ARG_INFO(0, link)
- ZEND_ARG_INFO(0, dn)
- ZEND_ARG_INFO(0, ttl)
- ZEND_ARG_INFO(0, newttl)
-ZEND_END_ARG_INFO()
-#endif
/* }}} */
/*
@@ -4001,10 +3942,6 @@ const zend_function_entry ldap_functions[] = {
PHP_FE(ldap_parse_exop_passwd, arginfo_ldap_parse_exop_passwd)
PHP_FE(ldap_parse_exop_whoami, arginfo_ldap_parse_exop_whoami)
#endif
-#ifdef HAVE_LDAP_REFRESH
- PHP_FE(ldap_refresh,
- arginfo_ldap_refresh)
-#endif
#endif
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)