Import of pkgsrc-2015Q2

This commit is contained in:
2015-08-30 02:56:09 -07:00
committed by Lionel Sambuc
parent 4af1cdf7a9
commit f641581404
15409 changed files with 267784 additions and 121624 deletions

View File

@@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.24 2014/02/12 23:17:40 tron Exp $
# $NetBSD: Makefile,v 1.25 2015/05/16 11:19:52 taca Exp $
MODNAME= ldap
PKGREVISION= 2
CATEGORIES+= databases
COMMENT= PHP extension for LDAP database access

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
$NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
$NetBSD$
/*
* Copyright (c) 2007-2009 Pierangelo Masarati
* Copyright (c) 2009,2012 Emmanuel Dreyfus
* Copyright (c) 2009,2015 Emmanuel Dreyfus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,23 +24,8 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
--- ext/ldap/config.m4.orig 2012-10-25 10:15:34.000000000 +0200
+++ ext/ldap/config.m4 2012-10-25 10:15:34.000000000 +0200
@@ -172,9 +172,11 @@
fi
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])
+ AC_CHECK_FUNCS([ldap_parse_result ldap_parse_extended_result ldap_parse_whoami ldap_parse_passwd ldap_parse_reference])
+ AC_CHECK_FUNCS([ldap_extended_operation_s ldap_start_tls_s ldap_whoami_s ldap_passwd_s])
+ AC_CHECK_FUNCS([ldap_search_ext_s ldap_add_ext_s ldap_modify_ext_s ldap_delete_ext_s ldap_compare_ext_s])
dnl
dnl SASL check
dnl
--- ext/ldap/ldap.c.orig 2012-10-25 10:15:34.000000000 +0200
+++ ext/ldap/ldap.c 2012-10-25 18:05:38.000000000 +0200
--- ext/ldap/ldap.c.orig 2015-03-18 10:45:50.000000000 +0100
+++ ext/ldap/ldap.c 2015-04-10 14:54:51.000000000 +0200
@@ -66,8 +66,13 @@
#elif defined(HAVE_LDAP_SASL_SASL_H)
#include <sasl/sasl.h>
@@ -104,7 +89,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
{
ldap_resultentry *entry = (ldap_resultentry *)rsrc->ptr;
@@ -194,8 +214,21 @@
@@ -203,8 +223,21 @@
REGISTER_LONG_CONSTANT("GSLC_SSL_ONEWAY_AUTH", GSLC_SSL_ONEWAY_AUTH, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("GSLC_SSL_TWOWAY_AUTH", GSLC_SSL_TWOWAY_AUTH, CONST_PERSISTENT | CONST_CS);
#endif
@@ -126,7 +111,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
le_result = zend_register_list_destructors_ex(_free_ldap_result, NULL, "ldap result", module_number);
le_result_entry = zend_register_list_destructors_ex(_free_ldap_result_entry, NULL, "ldap result entry", module_number);
@@ -276,15 +309,176 @@
@@ -285,15 +318,176 @@
DISPLAY_INI_ENTRIES();
}
/* }}} */
@@ -304,7 +289,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
char *wallet = NULL, *walletpasswd = NULL;
int walletlen = 0, walletpasswdlen = 0;
long authmode = GSLC_SSL_NO_AUTH;
@@ -318,23 +512,41 @@
@@ -327,23 +521,41 @@
ld = ecalloc(1, sizeof(ldap_linkdata));
@@ -353,27 +338,28 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
if (ldap == NULL) {
efree(ld);
RETURN_FALSE;
@@ -391,17 +603,32 @@
@@ -429,17 +641,33 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Password contains a null byte");
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link, -1, "ldap link", le_link);
- if ((rc = ldap_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw, LDAP_AUTH_SIMPLE)) != LDAP_SUCCESS) {
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ {
+ struct berval cred;
+ struct berval cred;
+
+ /* ldap_bind_s() is deprecated; use ldap_sasl_bind_s() instead */
+ cred.bv_val = ldap_bind_pw;
+ cred.bv_len = ldap_bind_pw ? ldap_bind_pwlen : 0;
+ rc = ldap_sasl_bind_s(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred,
+ NULL, NULL, /* no controls right now */
+ NULL); /* we don't care about the server's credentials */
+ NULL, NULL, /* no controls right now */
+ NULL); /* we don't care about the server's credentials */
+ }
+#else
+ rc = ldap_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw, LDAP_AUTH_SIMPLE);
+#endif
+ if ( rc != LDAP_SUCCESS) {
+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to bind to server: %s", ldap_err2string(rc));
RETURN_FALSE;
} else {
@@ -387,7 +373,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
typedef struct {
char *mech;
char *realm;
@@ -524,8 +751,9 @@
@@ -562,8 +790,9 @@
_php_sasl_freedefs(ctx);
}
/* }}} */
@@ -397,7 +383,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
/* {{{ proto bool ldap_unbind(resource link)
Unbind from LDAP directory */
PHP_FUNCTION(ldap_unbind)
@@ -1221,9 +1449,14 @@
@@ -1259,9 +1488,14 @@
for (i = 0; i<count; i++) {
add_index_string(return_value, i, ldap_value[i], 1);
}
@@ -412,7 +398,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
/* }}} */
/* {{{ proto string ldap_dn2ufn(string dn)
@@ -1254,38 +1487,67 @@
@@ -1292,38 +1526,67 @@
/* added to fix use of ldap_modify_add for doing an ldap_add, gerrit thomson. */
#define PHP_LD_FULL_ADD 0xff
/* {{{ php_ldap_do_modify
@@ -490,7 +476,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
ldap_mods[i] = emalloc(sizeof(LDAPMod));
ldap_mods[i]->mod_op = oper | LDAP_MOD_BVALUES;
ldap_mods[i]->mod_type = NULL;
@@ -1343,19 +1605,78 @@
@@ -1381,19 +1644,78 @@
zend_hash_move_forward(Z_ARRVAL_P(entry));
}
ldap_mods[num_attribs] = NULL;
@@ -517,11 +503,6 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Add: %s", ldap_err2string(i));
- RETVAL_FALSE;
- } else RETVAL_TRUE;
- } else {
- if ((i = ldap_modify_ext_s(ld->link, dn, ldap_mods, NULL, NULL)) != LDAP_SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Modify: %s", ldap_err2string(i));
- RETVAL_FALSE;
- } else RETVAL_TRUE;
+#ifdef HAVE_LDAP_ADD_EXT_S
+ if (ext) {
+ rc = ldap_add_ext(ld->link, dn, ldap_mods, lsctrls, lcctrls, &msgid);
@@ -533,7 +514,11 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
+ rc = ldap_add_s(ld->link, dn, ldap_mods);
+#endif /* ! HAVE_LDAP_ADD_EXT_S */
+
+ } else {
} else {
- if ((i = ldap_modify_ext_s(ld->link, dn, ldap_mods, NULL, NULL)) != LDAP_SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Modify: %s", ldap_err2string(i));
- RETVAL_FALSE;
- } else RETVAL_TRUE;
+#ifdef HAVE_LDAP_MODIFY_EXT_S
+ if (ext) {
+ rc = ldap_modify_ext(ld->link, dn, ldap_mods, lsctrls, lcctrls, &msgid);
@@ -578,7 +563,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
errexit:
for (i = 0; i < num_attribs; i++) {
@@ -1368,46 +1689,57 @@
@@ -1406,46 +1728,57 @@
}
efree(num_berval);
efree(ldap_mods);
@@ -642,7 +627,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
/* {{{ proto bool ldap_delete(resource link, string dn)
Delete an entry from a directory */
PHP_FUNCTION(ldap_delete)
@@ -1482,38 +1814,109 @@
@@ -1869,38 +2202,109 @@
RETURN_STRING(ldap_err2string(ld_errno), 1);
}
/* }}} */
@@ -741,7 +726,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
+#else /* ! HAVE_LDAP_COMPARE_EXT_S */
+ char *ldap_value;
+
+ ldap_value = Z_STRVAL_PP(value);
+ ldap_value = Z_STRVAL_PP(&value);
+ rc = ldap_compare_s(ld->link, ldap_dn, ldap_attr, ldap_value);
+#endif /* ! HAVE_LDAP_COMPARE_EXT_S */
+
@@ -771,19 +756,19 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
/* }}} */
/* {{{ proto bool ldap_sort(resource link, resource result, string sortfilter)
@@ -1545,59 +1948,230 @@
@@ -1932,58 +2336,232 @@
RETURN_TRUE;
}
/* }}} */
-#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10
-#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP
-/* {{{ proto bool ldap_get_option(resource link, int option, mixed retval)
- Get the current value of various session-wide parameters */
-PHP_FUNCTION(ldap_get_option)
+/* {{{ Extended API that returns result instead of just bool
+ * to allow further manipulation by the ldap_parse_*() funcs,
+ * Pierangelo Masarati */
+
+
+/* {{{ proto result ldap_bind_ext(resource link [, string dn, string password])
+ Bind to LDAP directory */
+PHP_FUNCTION(ldap_bind_ext)
@@ -798,9 +783,10 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz", &link, &option, &retval) != SUCCESS) {
- return;
+ int rc, msgid, lerr;
+ LDAPMessage *ldap_res;
+
+ LDAPMessage *ldap_res;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ss", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen) == FAILURE) {
+
+ RETURN_FALSE;
}
@@ -817,15 +803,15 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
-#ifdef LDAP_OPT_RESTART
- case LDAP_OPT_RESTART:
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ {
+ struct berval cred;
+
+ {
+ struct berval cred;
+
+ /* ldap_bind() is deprecated; use ldap_sasl_bind() instead */
+ cred.bv_val = ldap_bind_pw;
+ cred.bv_len = ldap_bind_pw ? ldap_bind_pwlen : 0;
+
+
+ rc = ldap_sasl_bind(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred,
+ NULL, NULL, /* no controls right now */
+ NULL, NULL, /* no controls right now */
+ &msgid);
+ if (rc != LDAP_SUCCESS) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to bind: %s", ldap_err2string(rc));
@@ -841,12 +827,6 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
#endif
- {
- int val;
+
+ rc = ldap_result(ld->link, msgid, LDAP_MSG_ALL, NULL, &ldap_res);
+ if (rc != LDAP_RES_BIND) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to get bind result: %s", ldap_err2string(rc));
+ RETURN_FALSE;
+ }
- if (ldap_get_option(ld->link, option, &val)) {
- RETURN_FALSE;
@@ -858,10 +838,10 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
- case LDAP_OPT_NETWORK_TIMEOUT:
- {
- struct timeval *timeout = NULL;
+ ZEND_REGISTER_RESOURCE(return_value, ldap_res, le_result);
+ rc = ldap_parse_result(ld->link, ldap_res, &lerr, NULL, NULL, NULL, NULL, 0);
+ if (rc == LDAP_SUCCESS) {
+ rc = lerr;
+ rc = ldap_result(ld->link, msgid, LDAP_MSG_ALL, NULL, &ldap_res);
+ if (rc != LDAP_RES_BIND) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to get bind result: %s", ldap_err2string(rc));
+ RETURN_FALSE;
+ }
- if (ldap_get_option(ld->link, LDAP_OPT_NETWORK_TIMEOUT, (void *) &timeout)) {
@@ -874,7 +854,13 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
- RETURN_FALSE;
- }
- zval_dtor(retval);
- ZVAL_LONG(retval, timeout->tv_sec);
+ ZEND_REGISTER_RESOURCE(return_value, ldap_res, le_result);
+ rc = ldap_parse_result(ld->link, ldap_res, &lerr, NULL, NULL, NULL, NULL, 0);
+ if (rc == LDAP_SUCCESS) {
+ rc = lerr;
+ }
+
+
+ if (rc != LDAP_SUCCESS) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to bind to server: %s", ldap_err2string(rc));
+ }
@@ -897,12 +883,13 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
+}
+/* }}} */
+
+
+/* {{{ proto result ldap_mod_add_ext(resource link, string dn, array entry)
+ Add attribute values to current */
+PHP_FUNCTION(ldap_mod_add_ext)
+{
+ php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD, 1);
+}
+}
+/* }}} */
+
+/* {{{ proto result ldap_mod_del_ext(resource link, string dn, array entry)
@@ -910,7 +897,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
+PHP_FUNCTION(ldap_mod_del_ext)
+{
+ php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_DELETE, 1);
+}
+}
+/* }}} */
+
+/* {{{ proto result ldap_delete_ext(resource link, string dn)
@@ -1039,12 +1026,11 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
+ RETURN_FALSE;
+ }
+ zval_dtor(retval);
+ ZVAL_LONG(retval, timeout->tv_sec);
ZVAL_LONG(retval, timeout->tv_sec);
ldap_memfree(timeout);
} break;
#elif defined(LDAP_X_OPT_CONNECT_TIMEOUT)
case LDAP_X_OPT_CONNECT_TIMEOUT:
@@ -1820,21 +2394,23 @@
@@ -2207,21 +2785,23 @@
}
/* }}} */
@@ -1067,13 +1053,13 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrz|zzz", &link, &result, &errcode, &matcheddn, &errmsg, &referrals) != SUCCESS) {
- return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrz|zzzz", &link, &result, &errcode, &matcheddn, &errmsg, &referrals, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrz|zzzz", &link, &result, &errcode, &matcheddn, &errmsg, &referrals, &serverctrls) != SUCCESS) {
+ WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link, -1, "ldap link", le_link);
ZEND_FETCH_RESOURCE(ldap_result, LDAPMessage *, &result, -1, "ldap result", le_result);
@@ -1842,9 +2418,9 @@
@@ -2229,9 +2809,9 @@
rc = ldap_parse_result(ld->link, ldap_result, &lerrcode,
myargcount > 3 ? &lmatcheddn : NULL,
myargcount > 4 ? &lerrmsg : NULL,
@@ -1084,7 +1070,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
if (rc != LDAP_SUCCESS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to parse result: %s", ldap_err2string(rc));
RETURN_FALSE;
@@ -1854,19 +2430,15 @@
@@ -2241,19 +2821,15 @@
ZVAL_LONG(errcode, lerrcode);
/* Reverse -> fall through */
@@ -1110,7 +1096,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
zval_dtor(errmsg);
if (lerrmsg == NULL) {
ZVAL_EMPTY_STRING(errmsg);
@@ -1887,8 +2459,142 @@
@@ -2274,8 +2850,142 @@
}
/* }}} */
#endif
@@ -1253,7 +1239,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
Return first reference */
PHP_FUNCTION(ldap_first_reference)
{
@@ -2184,60 +2890,742 @@
@@ -2758,54 +3468,736 @@
}
/* }}} */
#endif
@@ -1373,12 +1359,6 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
-ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_list, 0, 0, 3)
- ZEND_ARG_INFO(0, link_identifier)
- ZEND_ARG_INFO(0, base_dn)
- ZEND_ARG_INFO(0, filter)
- ZEND_ARG_INFO(0, attributes)
- ZEND_ARG_INFO(0, attrsonly)
- ZEND_ARG_INFO(0, sizelimit)
- ZEND_ARG_INFO(0, timelimit)
+ RETURN_TRUE;
+ }
+
@@ -2033,17 +2013,11 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_list, 0, 0, 3)
+ ZEND_ARG_INFO(0, link_identifier)
+ ZEND_ARG_INFO(0, base_dn)
+ ZEND_ARG_INFO(0, filter)
+ ZEND_ARG_INFO(0, attributes)
+ ZEND_ARG_INFO(0, attrsonly)
+ ZEND_ARG_INFO(0, sizelimit)
+ ZEND_ARG_INFO(0, timelimit)
ZEND_ARG_INFO(0, deref)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_search, 0, 0, 3)
@@ -2411,8 +3799,9 @@
ZEND_ARG_INFO(0, base_dn)
ZEND_ARG_INFO(0, filter)
ZEND_ARG_INFO(0, attributes)
ZEND_ARG_INFO(0, attrsonly)
@@ -3007,8 +4399,9 @@
ZEND_ARG_INFO(1, errcode)
ZEND_ARG_INFO(1, matcheddn)
ZEND_ARG_INFO(1, errmsg)
@@ -2053,7 +2027,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
#endif
#endif
@@ -2431,8 +3820,40 @@
@@ -3027,8 +4420,40 @@
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_8859_to_t61, 0, 0, 1)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
@@ -2094,7 +2068,7 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
/*
This is just a small subset of the functionality provided by the LDAP library. All the
@@ -2494,10 +3915,23 @@
@@ -3091,9 +4516,22 @@
#endif
#ifdef HAVE_LDAP_START_TLS_S
PHP_FE(ldap_start_tls, arginfo_ldap_resource)
@@ -2110,49 +2084,48 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
+#ifdef HAVE_LDAP_REFRESH
+ PHP_FE(ldap_refresh,
+ arginfo_ldap_refresh)
+#endif
#endif
+#endif
+
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
PHP_FE(ldap_set_rebind_proc, arginfo_ldap_set_rebind_proc)
#endif
@@ -2505,8 +3939,33 @@
@@ -3102,8 +4540,33 @@
PHP_FE(ldap_t61_to_8859, arginfo_ldap_t61_to_8859)
PHP_FE(ldap_8859_to_t61, arginfo_ldap_8859_to_t61)
#endif
+/* routines to handle standard track controls, Pierangelo Masarati */
+#ifdef LDAP_CONTROL_MANAGEDSAIT
+ PHP_FE(ldap_ctrl_manageDSAit, NULL)
+ PHP_FE(ldap_ctrl_manageDSAit, NULL)
+#endif
+#ifdef LDAP_CONTROL_PAGEDRESULTS
+ PHP_FE(ldap_ctrl_paged_results, NULL) /* fourth_arg_force_ref */
+ PHP_FE(ldap_ctrl_paged_results_resp, NULL) /* arg3to4of4_force_ref */
+ PHP_FE(ldap_ctrl_paged_results, NULL) /* fourth_arg_force_ref */
+ PHP_FE(ldap_ctrl_paged_results_resp, NULL) /* arg3to4of4_force_ref */
+#endif
+#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
+ PHP_FE(ldap_ctrl_ppolicy, NULL)
+ PHP_FE(ldap_ctrl_ppolicy_resp, NULL) /* arg3to6of6_force_ref */
+ PHP_FE(ldap_ctrl_ppolicy, NULL)
+ PHP_FE(ldap_ctrl_ppolicy_resp, NULL) /* arg3to6of6_force_ref */
+#endif
+#ifdef LDAP_CONTROL_NOOP
+ PHP_FE(ldap_ctrl_noop, NULL)
+ PHP_FE(ldap_ctrl_noop, NULL)
+#endif
+#ifdef LDAP_CONTROL_MANAGEDIT
+ PHP_FE(ldap_ctrl_manageDIT, NULL)
+ PHP_FE(ldap_ctrl_manageDIT, NULL)
+#endif
+#ifdef LDAP_CONTROL_X_PERMISSIVE_MODIFY
+ PHP_FE(ldap_ctrl_permissive_modify, NULL)
+ PHP_FE(ldap_ctrl_permissive_modify, NULL)
+#endif
+/* end of ando mod */
+
+
+
PHP_FE_END
};
/* }}} */
@@ -2527,8 +3986,10 @@
#ifdef LDAP_CONTROL_PAGEDRESULTS
PHP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result)
PHP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response)
#endif
@@ -3128,8 +4591,10 @@
STANDARD_MODULE_PROPERTIES_EX
};
/* }}} */
@@ -2163,9 +2136,36 @@ $NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
* Local variables:
* tab-width: 4
* c-basic-offset: 4
--- ext/ldap/php_ldap.h.orig 2012-10-25 10:15:34.000000000 +0200
+++ ext/ldap/php_ldap.h 2012-10-25 10:15:34.000000000 +0200
@@ -36,8 +36,121 @@
--- ext/ldap/php_ldap.h.orig 2015-03-18 10:45:50.000000000 +0100
+++ ext/ldap/php_ldap.h 2015-04-12 11:22:11.000000000 +0200
@@ -28,16 +28,148 @@
#endif
#include <ldap.h>
+#define HAVE_3ARG_SETREBINDPROC
+#define HAVE_LDAP_ADD_EXT_S
+#define HAVE_LDAP_MODIFY_EXT_S
+#define HAVE_LDAP_COMPARE_EXT_S
+#define HAVE_LDAP_DELETE_EXT_S
+#define HAVE_LDAP_PARSE_EXTENDED_RESULT
+#define HAVE_LDAP_PARSE_PASSWD
+#define HAVE_LDAP_PARSE_WHOAMI
+#define HAVE_LDAP_EXTENDED_OPERATION_S
+#define HAVE_LDAP_PASSWD_S
+#define HAVE_LDAP_WHOAMI_S
+#define HAVE_LDAP_REFRESH
+#define HAVE_LDAP_EXTENDED_OPERATION_S
+#define HAVE_LDAP_REFRESH
+#define HAVE_LDAP_EXTENDED_OPERATION_S
+#define HAVE_LDAP_REFRESH
+#define HAVE_LDAP_EXTENDED_OPERATION
+
+
extern zend_module_entry ldap_module_entry;
#define ldap_module_ptr &ldap_module_entry
/* LDAP functions */
PHP_MINIT_FUNCTION(ldap);
PHP_MSHUTDOWN_FUNCTION(ldap);
PHP_MINFO_FUNCTION(ldap);

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.3 2011/04/13 13:23:05 adam Exp $
# $NetBSD: options.mk,v 1.4 2015/04/13 08:04:17 manu Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.php-ldap
PKG_SUPPORTED_OPTIONS= sasl exop
@@ -15,7 +15,7 @@ CONFIGURE_ARGS+= --with-ldap-sasl=${PREFIX}
.if !empty(PKG_OPTIONS:Mexop)
USE_TOOLS+= patch
EXOP_PATCH= ${FILESDIR}/ldap-ctrl-exop.patch
EXOP_PATCH= ${FILESDIR}/ldap-ctrl-exop${PKG_PHP_VERSION}.patch
post-patch:
${PATCH} -d ${WRKSRC} -p2 --forward --quiet < ${EXOP_PATCH}
.endif