[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Status of ldap_init_fd and LDAP_PROTO_EXT?
- To: openldap-devel@OpenLDAP.org
- Subject: Re: Status of ldap_init_fd and LDAP_PROTO_EXT?
- From: Alexander Bokovoy <abokovoy@redhat.com>
- Date: Wed, 7 Jun 2017 07:09:10 +0300
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=abokovoy@redhat.com
- Content-disposition: inline
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3D84D80C01
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3D84D80C01
- In-reply-to: <bb7ce966-097f-f1f1-bb58-a5120d3db4a1@redhat.com>
- References: <20170415150451.GA25458@sernet.de> <WM!d6aa60b21c028ff08301141b36422c44fc825615f7c487c58b10b790bf4a08db5afb15aad969f05996f012a858a531b7!@mailstronghold-2.zmailcloud.com> <37fa51cd-a4cc-fc90-5e7e-699dcf126c63@symas.com> <20170508121010.GA8392@sernet.de> <bb7ce966-097f-f1f1-bb58-a5120d3db4a1@redhat.com>
- User-agent: NeoMutt/20170306 (1.8.0)
On ma, 05 kesä 2017, Alexander Bokovoy wrote:
Hi,
On 08.05.2017 15:10, Volker Lendecke wrote:
> On Mon, May 08, 2017 at 11:57:28AM +0100, Howard Chu wrote:
> > Generally, <ldap.h> was only supposed to export the "official" LDAP API and
> > anything that was specific to OpenLDAP's implementation was stashed in
> > <ldap_pvt.h> as non-standard features. I suppose the distinction is somewhat
> > meaningless these days since the last LDAP API RFC was only valid for LDAPv2
> > and a version for LDAPv3 was never approved. At this point, OpenLDAP's API
> > is the de facto standard. As clumsy as it may be...
>
> So I'm getting from this that ldap_pvt.h should be installed and that
> you don't plan to change this arbitrarily. "pvt" to me meant
> "private". For Samba, if we have a "private" API, we take the liberty
> to change this without real notice.
Was there any conclusive decision? May be the attached patch could help to
get things moving?
We'd like to use ldap_init_fd() in Samba and if it is OK to use it, may be
moving it to <ldap.h> is a good solution?
A small update -- get back to use 'struct ldap **ldp' in ldap_pvt.h
header instead of 'LDAP **ldp' as that one is not defined in the private
header. Also re-format ldap_init_fd() definition in ldap.h to follow the
rest of the header.
--
/ Alexander Bokovoy
From 2c1f3afd8098b2a345a900effa1a2e5c3f9e3b08 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Mon, 5 Jun 2017 14:43:58 +0300
Subject: [PATCH] ldap_init_fd: move ldap_init_fd() definition to ldap.h
While OpenLDAP team position is that all code in OpenLDAP source
distribution can be used by users, most distributions do not ship
ldap_pvt.h as part of openldap-devel (sub)package.
Move ldap_init_fd() to ldap.h to facilitate external users who have a
need to integrate OpenLDAP with their own event loop processing.
---
doc/man/man3/ldap_open.3 | 5 +----
include/ldap.h | 8 ++++++++
include/ldap_pvt.h | 2 --
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/doc/man/man3/ldap_open.3 b/doc/man/man3/ldap_open.3
index 1d5e2b5..4f980f2 100644
--- a/doc/man/man3/ldap_open.3
+++ b/doc/man/man3/ldap_open.3
@@ -3,7 +3,7 @@
.\" Copyright 1998-2017 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
-ldap_init, ldap_initialize, ldap_open \- Initialize the LDAP library and open a connection to an LDAP server
+ldap_init, ldap_initialize, ldap_open, ldap_init_fd \- Initialize the LDAP library and open a connection to an LDAP server
.SH LIBRARY
OpenLDAP LDAP (libldap, \-lldap)
.SH SYNOPSIS
@@ -45,9 +45,6 @@ LDAPURLDesc **url;
void *params;
.LP
.ft B
-#include <ldap_pvt.h>
-.LP
-.ft B
int ldap_init_fd(fd, proto, uri, ldp)
.ft
ber_socket_t fd;
diff --git a/include/ldap.h b/include/ldap.h
index 588e906..dd0c118 100644
--- a/include/ldap.h
+++ b/include/ldap.h
@@ -1548,6 +1548,14 @@ LDAP_F( LDAP * )
ldap_dup LDAP_P((
LDAP *old ));
+/* open */
+LDAP_F (int)
+ldap_init_fd LDAP_P((
+ ber_socket_t fd,
+ int proto,
+ LDAP_CONST char *url,
+ LDAP **ldp ));
+
/*
* in tls.c
*/
diff --git a/include/ldap_pvt.h b/include/ldap_pvt.h
index f1d93ac..49f674c 100644
--- a/include/ldap_pvt.h
+++ b/include/ldap_pvt.h
@@ -344,8 +344,6 @@ ldap_get_message_ber LDAP_P((
/* open */
LDAP_F (int) ldap_open_internal_connection LDAP_P((
struct ldap **ldp, ber_socket_t *fdp ));
-LDAP_F (int) ldap_init_fd LDAP_P((
- ber_socket_t fd, int proto, LDAP_CONST char *url, struct ldap **ldp ));
/* sasl.c */
LDAP_F (int) ldap_pvt_sasl_generic_install LDAP_P(( Sockbuf *sb,
--
2.9.3