Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87729 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49594 invoked from network); 12 Aug 2015 11:00:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2015 11:00:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=rainer.jung@kippdata.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rainer.jung@kippdata.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain kippdata.de designates 195.227.30.149 as permitted sender) X-PHP-List-Original-Sender: rainer.jung@kippdata.de X-Host-Fingerprint: 195.227.30.149 capsella.kippdata.de Solaris 10 (beta) Received: from [195.227.30.149] ([195.227.30.149:48250] helo=mailserver.kippdata.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/E1-29560-E572BC55 for ; Wed, 12 Aug 2015 07:00:48 -0400 Received: from [172.28.1.118] ([192.168.2.104]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id t7CB0ULI028104; Wed, 12 Aug 2015 13:00:31 +0200 (CEST) To: PHP internals References: <5582BC3E.30109@opensides.be> <55C8FFF9.40509@kippdata.de> <2E228E18-2AC9-4FA5-AB11-4F7C3365EB0B@heigl.org> <55C92754.8040308@kippdata.de> <55CA0DAD.8010405@opensides.be> Cc: =?UTF-8?Q?C=c3=b4me_BERNIGAUD?= , Andreas Heigl Message-ID: <55CB2749.2020809@kippdata.de> Date: Wed, 12 Aug 2015 13:00:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55CA0DAD.8010405@opensides.be> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] LDAP module requirements? From: rainer.jung@kippdata.de (Rainer Jung) Hi Côme, Am 11.08.2015 um 16:58 schrieb Côme BERNIGAUD: > On 2015-08-11 00:36, Rainer Jung wrote: >> The current problems should be mostly around the above four compiler >> warnings. I can test any patches you want me to test. > > Can you test including the attached file in ext/ldap/ldap.c, and not > defining HAVE_3ARG_SETREBINDPROC and LDAP_CONTROL_PAGEDRESULTS ? thanks for the patch proposal. There's a few problems with it and I will come back to you with an alternative proposal soon. For the moment: - the definition of ldap_control_find in terms of at the top of ldap.c currently is protected by #if !defined(HAVE_LDAP_CONTROL_FIND) It should be #if defined(LDAP_CONTROL_PAGEDRESULTS) && !defined(HAVE_LDAP_CONTROL_FIND) That's not related to your patch. - in void ldap_memvfree( void **value ) { ldap_value_free(value); } it should probably be ldap_value_free((char **)value); otherwise we get compiler warnings. - instead of ldap_open() we can use ldap_init() (recommended). - using ldap_open() or ldap_init() with a url does not work, we have to use host and port. - the use of ldap_sasl_bind_s() in PHP_FUNCTION(ldap_bind) does not work, without setting "LDAP_OPT_PROTOCOL_VERSION" to LDAP_VERSION3 using ldap_set_option(). Maybe it works for OpenLDAP, but Netscape and Solaris document it must be set and indeed return LDAP_NOT_SUPPORTED immediately otherwise. But since in PHP_FUNCTION(ldap_bind) no SASL functionality is actually being used, I propose to use ldap_simple_bind_s() instead of ldap_sasl_bind_s(). It is not deprecated and using it actually simplifies the code a bit. As I said, I'll come up with a patch proposal soon. The patch should also help for other LDAP implementations than OpenLDAP or Solaris. Regards, Rainer