Re: Status of ldap_init_fd and LDAP_PROTO_EXT?

2017-09-19 Thread Alexander Bokovoy

On ti, 19 syys 2017, Quanah Gibson-Mount wrote:
--On Wednesday, June 07, 2017 8:09 AM +0300 Alexander Bokovoy 
 wrote:




We'd like to use ldap_init_fd() in Samba and if it is OK to use it, may
be  moving it to  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.


Hi Alexander,

Just as a reminder, for us to consider this patch for inclusion, we 
need the relevent IPR statement, as I noted to you in ITS#8671.

Yes, I'll come back to you a bit later, I'm busy this and next week.
--
/ Alexander Bokovoy



Re: Status of ldap_init_fd and LDAP_PROTO_EXT?

2017-09-19 Thread Quanah Gibson-Mount
--On Wednesday, June 07, 2017 8:09 AM +0300 Alexander Bokovoy 
 wrote:




We'd like to use ldap_init_fd() in Samba and if it is OK to use it, may
be  moving it to  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.


Hi Alexander,

Just as a reminder, for us to consider this patch for inclusion, we need 
the relevent IPR statement, as I noted to you in ITS#8671.


Regards,
Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:





Re: Status of ldap_init_fd and LDAP_PROTO_EXT?

2017-06-05 Thread Alexander Bokovoy

Hi,

On 08.05.2017 15:10, Volker Lendecke wrote:

On Mon, May 08, 2017 at 11:57:28AM +0100, Howard Chu wrote:

Generally,  was only supposed to export the "official" LDAP API and
anything that was specific to OpenLDAP's implementation was stashed in
 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  is a good solution?


--
/ Alexander Bokovoy
>From 6b459d214d31e75674aa9893bd5bed37f8cabdfa Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy 
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   | 4 
 include/ldap_pvt.h   | 4 +---
 3 files changed, 6 insertions(+), 7 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 
-.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..d358663 100644
--- a/include/ldap.h
+++ b/include/ldap.h
@@ -1548,6 +1548,10 @@ 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..62c64b8 100644
--- a/include/ldap_pvt.h
+++ b/include/ldap_pvt.h
@@ -343,9 +343,7 @@ 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 ));
+	LDAP **ldp, ber_socket_t *fdp ));
 
 /* sasl.c */
 LDAP_F (int) ldap_pvt_sasl_generic_install LDAP_P(( Sockbuf *sb,
-- 
2.9.3



Re: Status of ldap_init_fd and LDAP_PROTO_EXT?

2017-05-08 Thread Volker Lendecke
On Mon, May 08, 2017 at 11:57:28AM +0100, Howard Chu wrote:
> Generally,  was only supposed to export the "official" LDAP API and
> anything that was specific to OpenLDAP's implementation was stashed in
>  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.

Thanks,

Volker



Re: Status of ldap_init_fd and LDAP_PROTO_EXT?

2017-05-08 Thread Howard Chu

Volker Lendecke wrote:

Hi!

What's the status of those two? They are mentioned in the manpages of
for example Debian Jessie and FreeBSD 11 (maybe from ports?), but the
manpage explicitly says you have to #include , which is
not shipped.

What's the reason of them being in ldap_pvt.h? Are they supposed to
change in the future? The function is now more than 10 years old,
without too much change in that decade.


Generally,  was only supposed to export the "official" LDAP API and 
anything that was specific to OpenLDAP's implementation was stashed in 
 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...


Not being able to fully asynchronously connect to a server was my main
reason to start my own little ldap library a few years ago, so I think
this can be useful code :-)


Talk to your distro folks about shipping the files then. The Project's policy 
is that we do source releases exclusively, and everything contained in a 
source release is intended for end-users to read and use. That is, again, the 
point of open source. It would also help if end-users read the scripts in the 
test suite and used them as examples of how to setup various configurations.


Thanks, Volker





--
  -- Howard Chu
  CTO, Symas Corp.   http://www.symas.com
  Director, Highland Sun http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/



Status of ldap_init_fd and LDAP_PROTO_EXT?

2017-04-15 Thread Volker Lendecke
Hi!

What's the status of those two? They are mentioned in the manpages of
for example Debian Jessie and FreeBSD 11 (maybe from ports?), but the
manpage explicitly says you have to #include , which is
not shipped.

What's the reason of them being in ldap_pvt.h? Are they supposed to
change in the future? The function is now more than 10 years old,
without too much change in that decade.

Not being able to fully asynchronously connect to a server was my main
reason to start my own little ldap library a few years ago, so I think
this can be useful code :-)

Thanks, Volker