[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldapmodify support for LDIF "control:" tag (ITS#2060)



I've moved the ldap_control[s]_dup() functions to ldap_pvt.h
instead of ldap.h.

At 07:52 AM 2002-09-03, DSTECK@novell.com wrote:
>Sorry, at Novell we build the C LDAP client library as a dynamic
>library, so the tools can only call functions which are specifically
>exported.  We created a copy of ldap_control_dup inside ldapmodify.  
>
>For the OpenLDAP environment, it appears that the prototype for
>ldap_control_dup should just be moved from ldap-int.h to ldap.h.
>
>Index: ldap-int.h
>===================================================================
>RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/ldap-int.h,v
>retrieving revision 1.134
>diff -u -r1.134 ldap-int.h
>--- ldap-int.h  29 Aug 2002 10:12:36 -0000      1.134
>+++ ldap-int.h  3 Sep 2002 14:42:16 -0000
>@@ -370,9 +370,6 @@
> /*
>  * in controls.c
>  */
>-LDAP_F (LDAPControl *) ldap_control_dup LDAP_P((
>-       const LDAPControl *ctrl ));
>-
> LDAP_F (LDAPControl **) ldap_controls_dup LDAP_P((
>        LDAPControl *const *ctrls ));
> 
>
>
>Index: ldap.h
>===================================================================
>RCS file: /repo/OpenLDAP/pkg/ldap/include/ldap.h,v
>retrieving revision 1.179
>diff -u -r1.179 ldap.h
>--- ldap.h      30 Aug 2002 04:17:25 -0000      1.179
>+++ ldap.h      3 Sep 2002 14:43:59 -0000
>@@ -571,6 +571,9 @@
> ldap_controls_free LDAP_P((
>        LDAPControl **ctrls ));
> 
>+LDAP_F (LDAPControl *) ldap_control_dup LDAP_P((
>+       const LDAPControl *ctrl ));
>+
> /*
>  * in dnssrv.c:
>  */
>
>
>
>>>> Pierangelo Masarati <openldap-its@OpenLDAP.org> 08/31/02 04:03AM
>>>>
>> Full_Name: David Steck
>> Version: -devel
>> OS: Win2K
>> URL: ftp://ftp.openldap.org/incoming/steck-020830.patch 
>> Submission from: (NULL) (137.65.133.66)
>
>Applied to HEAD, please test.
>
>Need to resolve ldap_control_dup declaration.
>
>Pierangelo.
>
>> 
>> 
>> ldapmodify does not support the "control:" tag as required by
>rfc2849.  This
>> patch adds support for it.  Note: Some ldapmodify options (like -M)
>cause
>> default controls to be set.  If you specify a control with an
>ldap_modify
>> operation, the default controls are not applied.  Therefore we add
>any
>default
>> controls to the list of controls attached to the ldap_modify call.
>> 
>> Also changed some strdup() calls to ber_strdup() to be consistent
>with other
>> ber_strdup and ber_memfree calls.  (It's important in a Windows
>dynamic
>> library.)
>> 
>> The patch is located in ftp.openldap.org/incoming/steck-020830.patch