OpenLDAP
Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest

Viewing Documentation/8112
Full headers

From: quanah@openldap.org
Subject: man pages suggest using deprecated fuctions
Compose comment
Download message
State:
0 replies:
1 followups: 1

Major security issue: yes  no

Notes:

Notification:


Date: Wed, 22 Apr 2015 22:33:40 +0000
From: quanah@openldap.org
To: openldap-its@OpenLDAP.org
Subject: man pages suggest using deprecated fuctions
Full_Name: Quanah Gibson-Mount
Version: RE24
OS: NA
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (75.111.52.177)


ldap_get_dn(3) states that when using the ldap_explode_rdn function,
ldap_value_free can be used to free the results.  However, ldap_value_free is
deprecated.

Making things worse, it is suggested that the replacement for ldap_value_free is
ldap_value_free_len.  ldap_value_free_len expects a bval array, whereas
ldap_explode_rdn returns a char* array.

Finally, if you look at the actual OpenLDAP library code, what is done there
is:

vv = ldap_explode_rdn( values[ n ], 0 );
LDAP_VFREE( vv );

where:

#define LDAP_VFREE(v)                (ber_memvfree_x((void **)(v),NULL))

so NEITHER ldap_value_free NOR ldap_value_free_len are even used when using the
ldap_explode_rdn function.

Followup 1

Download message
Date: Wed, 22 Apr 2015 16:20:02 -0700
From: Quanah Gibson-Mount <quanah@zimbra.com>
To: openldap-its@OpenLDAP.org
Subject: Re: (ITS#8112) man pages suggest using deprecated fuctions
--On Wednesday, April 22, 2015 11:33 PM +0000 quanah@openldap.org wrote:

> Full_Name: Quanah Gibson-Mount
> Version: RE24
> OS: NA
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (75.111.52.177)
>
>
> ldap_get_dn(3) states that when using the ldap_explode_rdn function,
> ldap_value_free can be used to free the results.  However,
> ldap_value_free is deprecated.

According to *some* of the code, ldap_explode_rdn is actually deprecated:

ldap_explode_rdn LDAP_P(( /* deprecated, ldap_str2rdn */

However, it is not wrapped in an ifdef for deprecated, nor is it listed as 
such in the manpage.

--Quanah

--

Quanah Gibson-Mount
Platform Architect
Zimbra, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration


Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest


The OpenLDAP Issue Tracking System uses a hacked version of JitterBug

______________
© Copyright 2013, OpenLDAP Foundation, info@OpenLDAP.org