pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2015Q1]: pkgsrc/databases/php-ldap Pullup ticket #4669 - reque...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2dcfa1134ae5
branches:  pkgsrc-2015Q1
changeset: 649176:2dcfa1134ae5
user:      tron <tron%pkgsrc.org@localhost>
date:      Tue Apr 21 18:55:45 2015 +0000

description:
Pullup ticket #4669 - requested by manu
databases/php-ldap: build fix

Revisions pulled up:
- databases/php-ldap/files/ldap-ctrl-exop.patch                 deleted
- databases/php-ldap/files/ldap-ctrl-exop54.patch               1.1-1.2
- databases/php-ldap/files/ldap-ctrl-exop55.patch               1.1-1.2
- databases/php-ldap/files/ldap-ctrl-exop56.patch               1.1-1.2
- databases/php-ldap/options.mk                                 1.4

---
   Module Name:    pkgsrc
   Committed By:   manu
   Date:           Mon Apr 13 08:04:17 UTC 2015

   Modified Files:
           pkgsrc/databases/php-ldap: options.mk
   Added Files:
           pkgsrc/databases/php-ldap/files: ldap-ctrl-exop54.patch
               ldap-ctrl-exop55.patch ldap-ctrl-exop56.patch
   Removed Files:
           pkgsrc/databases/php-ldap/files: ldap-ctrl-exop.patch

   Log Message:
   Update the LDAP EXOP support patch for PHP 5.4, 5.5 and 5.6

---
   Module Name:    pkgsrc
   Committed By:   manu
   Date:           Mon Apr 20 03:24:36 UTC 2015

   Modified Files:
           pkgsrc/databases/php-ldap/files: ldap-ctrl-exop54.patch
               ldap-ctrl-exop55.patch ldap-ctrl-exop56.patch

   Log Message:
   Fix build with SASL disabled

   Do not force-define HAVE_LDAP_SASL, since the PHP configure script
   actually takes care of that one. This lets us build with the exop
   option enabled while sasl is disabled.

diffstat:

 databases/php-ldap/files/ldap-ctrl-exop.patch   |  2289 -----------------------
 databases/php-ldap/files/ldap-ctrl-exop54.patch |  2260 ++++++++++++++++++++++
 databases/php-ldap/files/ldap-ctrl-exop55.patch |  2289 +++++++++++++++++++++++
 databases/php-ldap/files/ldap-ctrl-exop56.patch |  2263 ++++++++++++++++++++++
 databases/php-ldap/options.mk                   |     4 +-
 5 files changed, 6814 insertions(+), 2291 deletions(-)

diffs (truncated from 9135 to 300 lines):

diff -r b8c6036599ce -r 2dcfa1134ae5 databases/php-ldap/files/ldap-ctrl-exop.patch
--- a/databases/php-ldap/files/ldap-ctrl-exop.patch     Sat Apr 18 22:51:08 2015 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,2289 +0,0 @@
-$NetBSD: ldap-ctrl-exop.patch,v 1.3 2012/10/29 08:50:29 manu Exp $
-/*
- * Copyright (c) 2007-2009 Pierangelo Masarati
- * Copyright (c) 2009,2012 Emmanuel Dreyfus
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * 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
-@@ -66,8 +66,13 @@
- #elif defined(HAVE_LDAP_SASL_SASL_H)
- #include <sasl/sasl.h>
- #endif
- 
-+/* XXX Not detected by configure... */
-+#ifdef LDAP_EXOP_REFRESH
-+#define HAVE_LDAP_REFRESH 1
-+#endif
-+
- typedef struct {
-       LDAP *link;
- #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
-       zval *rebindproc;
-@@ -88,31 +93,46 @@
- #ifdef COMPILE_DL_LDAP
- ZEND_GET_MODULE(ldap)
- #endif
- 
-+
-+/* {{{ proto void _close_ldap_link()
-+   close a connection and free LDAP resources */
- static void _close_ldap_link(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
- {
-       ldap_linkdata *ld = (ldap_linkdata *)rsrc->ptr;
- 
--      ldap_unbind_s(ld->link);
--#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
-+      /* ldap_unbind_s() is deprecated;
-+       * the distinction between ldap_unbind() and ldap_unbind_s() is moot */
-+#ifdef LDAP_API_FEATURE_X_OPENLDAP
-+      ldap_unbind_ext(ld->link, NULL, NULL);
-+#ifdef HAVE_3ARG_SETREBINDPROC
-+
-       if (ld->rebindproc != NULL) {
-               zval_dtor(ld->rebindproc);
-               FREE_ZVAL(ld->rebindproc);
-       }
- #endif
-+#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
-+      ldap_unbind_s(ld->link);
-+#endif /* ! LDAP_API_FEATURE_X_OPENLDAP */
-+
-       efree(ld);
-       LDAPG(num_links)--;
- }
- /* }}} */
- 
-+/* {{{ proto void _free_ldap_result()
-+   free the result of an LDAP operation */
- static void _free_ldap_result(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
- {
-       LDAPMessage *result = (LDAPMessage *)rsrc->ptr;
-       ldap_msgfree(result);
- }
- /* }}} */
- 
-+/* {{{ proto void _free_ldap_result_entry()
-+   free an entry resulting from an LDAP search operation */
- static void _free_ldap_result_entry(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
- {
-       ldap_resultentry *entry = (ldap_resultentry *)rsrc->ptr;
- 
-@@ -194,8 +214,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
- 
-+#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
-+      REGISTER_LONG_CONSTANT("PP_passwordExpired", PP_passwordExpired, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_accountLocked", PP_accountLocked, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_changeAfterReset", PP_changeAfterReset, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_passwordModNotAllowed", PP_passwordModNotAllowed, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_mustSupplyOldPassword", PP_mustSupplyOldPassword, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_insufficientPasswordQuality", PP_insufficientPasswordQuality, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_passwordTooShort", PP_passwordTooShort, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_passwordTooYoung", PP_passwordTooYoung, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_passwordInHistory", PP_passwordInHistory, CONST_PERSISTENT | CONST_CS);
-+      REGISTER_LONG_CONSTANT("PP_noError", PP_noError, CONST_PERSISTENT | CONST_CS);
-+#endif /* LDAP_CONTROL_PASSWORDPOLICYREQUEST */
-+
-       le_link = zend_register_list_destructors_ex(_close_ldap_link, NULL, "ldap link", module_number);
-       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 @@
-       DISPLAY_INI_ENTRIES();
- }
- /* }}} */
- 
-+
-+/* {{{ proto int _php_parse_referrals_resp()
-+   parse an array of LDAP referrals into a zval array */
-+static int _php_parse_referrals_resp(char ***lreferralsp, zval **referrals)
-+{
-+      int     num_referrals = 0;
-+
-+      if (*lreferralsp != NULL) {
-+              char    **refp = *lreferralsp;
-+
-+              while (*refp) {
-+                      add_next_index_string(*referrals, *refp, 1);
-+                      refp++;
-+                      num_referrals++;
-+              }
-+#ifdef LDAP_API_FEATURE_X_OPENLDAP
-+              ber_memvfree((void **)*lreferralsp);
-+#else
-+              ldap_value_free(*lreferralsp);
-+#endif
-+              *lreferralsp = NULL;
-+      }
-+
-+      return num_referrals;
-+}
-+/* }}} */
-+
-+/* {{{ proto int _php_parse_controls()
-+   parse an array of zvals into an array of LDAP controls */
-+static int _php_parse_controls(zval **ctrls, LDAPControl ***lctrlsp)
-+{
-+      LDAPControl *lctrl, **lctrls, **lctrlp;
-+      zval **ctrlval, **val;
-+      int ncontrols;
-+      char error = 0;
-+
-+              
-+      if ((Z_TYPE_PP(ctrls) != IS_ARRAY) || !(ncontrols = zend_hash_num_elements(Z_ARRVAL_PP(ctrls)))) {
-+              php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected non-empty array value");
-+              return 0;
-+      }
-+
-+      lctrls = safe_emalloc((1 + ncontrols), sizeof(*lctrls), 0);
-+      *lctrls = NULL;
-+      lctrlp = lctrls;
-+      zend_hash_internal_pointer_reset(Z_ARRVAL_PP(ctrls));
-+      while (zend_hash_get_current_data(Z_ARRVAL_PP(ctrls), (void**)&ctrlval) == SUCCESS) {
-+              if (Z_TYPE_PP(ctrlval) != IS_ARRAY) {
-+                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "The array value must contain only arrays, where each array is a control");
-+                      error = 1;
-+                      break;
-+              }
-+              if (zend_hash_find(Z_ARRVAL_PP(ctrlval), "oid", sizeof("oid"), (void **) &val) == FAILURE) {
-+                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "Control must have an oid key");
-+                      error = 1;
-+                      break;
-+              }
-+              lctrl = *lctrlp = emalloc(sizeof(**lctrlp));
-+              convert_to_string_ex(val);
-+              lctrl->ldctl_oid = Z_STRVAL_PP(val);
-+              if (zend_hash_find(Z_ARRVAL_PP(ctrlval), "value", sizeof("value"), (void **) &val) == SUCCESS) {
-+                      convert_to_string_ex(val);
-+                      lctrl->ldctl_value.bv_val = Z_STRVAL_PP(val);
-+                      lctrl->ldctl_value.bv_len = Z_STRLEN_PP(val);
-+              } else {
-+                      lctrl->ldctl_value.bv_val = NULL;
-+                      lctrl->ldctl_value.bv_len = 0;
-+              }
-+              if (zend_hash_find(Z_ARRVAL_PP(ctrlval), "iscritical", sizeof("iscritical"), (void **) &val) == SUCCESS) {
-+                      convert_to_boolean_ex(val);
-+                      lctrl->ldctl_iscritical = Z_BVAL_PP(val);
-+              } else {
-+                      lctrl->ldctl_iscritical = 0;
-+              }
-+              
-+              ++lctrlp;
-+              *lctrlp = NULL;
-+              zend_hash_move_forward(Z_ARRVAL_PP(ctrls));
-+      }
-+      if (!error) {
-+              *lctrlsp = lctrls;
-+      }
-+      return ncontrols;
-+}
-+/* }}} */
-+
-+/* {{{ proto void _php_free_controls()
-+   frees an array of LDAP controls as parsed (and malloc'ed) by _php_parse_controls */
-+static void _php_free_controls(LDAPControl ***lctrlsp)
-+{
-+      LDAPControl **lctrlp;
-+
-+      for (lctrlp = *lctrlsp; *lctrlp; lctrlp++) {
-+              efree(*lctrlp);
-+      }
-+      efree(*lctrlsp);
-+      *lctrlsp = NULL;
-+}
-+/* }}} */
-+
-+/* {{{ proto void _php_parse_controls_resp()
-+   parse an array of LDAP controls into a zval array */
-+static int _php_parse_controls_resp(LDAPControl ***lctrlsp, zval **ctrls)
-+{
-+      int     num_ctrls = 0;
-+
-+      if (*lctrlsp != NULL) {
-+              int             error = 0;
-+              LDAPControl     **ctrlp = *lctrlsp;
-+
-+              while (*ctrlp) {
-+                      zval *ctrlval = NULL;
-+
-+                      if ( (*ctrlp)->ldctl_oid == NULL ) {
-+                              error = 1;
-+                              break;
-+                      }
-+
-+                      MAKE_STD_ZVAL(ctrlval);
-+                      array_init(ctrlval);
-+
-+                      add_assoc_string(ctrlval, "oid", (*ctrlp)->ldctl_oid, 1);
-+                      if ( (*ctrlp)->ldctl_value.bv_len ) {
-+                              add_assoc_stringl(ctrlval, "value", (*ctrlp)->ldctl_value.bv_val, (*ctrlp)->ldctl_value.bv_len, 1);
-+                      }
-+
-+                      /* As per <draft-ietf-ldapbis-protocol>:
-+                       *
-+                       * 4.1.11
-+
-+   The criticality field only has meaning in controls attached to
-+   request messages (except UnbindRequest). For controls attached to
-+   response messages and the UnbindRequest, the criticality field SHOULD
-+   be FALSE, and MUST be ignored by the receiving protocol peer.
-+
-+                       */
-+
-+                      add_next_index_zval(*ctrls, ctrlval);
-+
-+                      num_ctrls++;
-+                      ctrlp++;
-+              }
-+              ldap_controls_free(*lctrlsp);
-+              *lctrlsp = NULL;
-+
-+              if (error) {
-+                      /* ... */
-+                      return -1;
-+              }
-+      }
-+
-+      return num_ctrls;
-+}
-+/* }}} */
-+
- /* {{{ proto resource ldap_connect([string host [, int port [, string wallet [, string wallet_passwd [, int authmode]]]]])
-    Connect to an LDAP server */
- PHP_FUNCTION(ldap_connect)
- {
-       char *host = NULL;
-       int hostlen;
--      long port = 389; /* Default port */
-+      int port = 



Home | Main Index | Thread Index | Old Index