Issue 8112 - man pages suggest using deprecated fuctions
Summary: man pages suggest using deprecated fuctions
Status: UNCONFIRMED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: 3.0.0
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-22 22:33 UTC by Quanah Gibson-Mount
Modified: 2021-06-10 16:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Quanah Gibson-Mount 2015-04-22 22:33:40 UTC
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.
Comment 1 Quanah Gibson-Mount 2015-04-22 22:52:13 UTC
moved from Incoming to Documentation
Comment 2 Quanah Gibson-Mount 2015-04-22 23:20:02 UTC
--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

Comment 3 Quanah Gibson-Mount 2020-03-20 22:43:23 UTC
Need clarification on whether or not some of these functions are deprecated, which is a code issue.

Documentation cannot be updated until our code is consistent.
Comment 4 Quanah Gibson-Mount 2021-03-01 17:32:06 UTC
Need to cross reference if they are deprecated in the LDAP v3 RFC, and whether or not the alternatives are usable.
Comment 5 Quanah Gibson-Mount 2021-06-10 16:50:44 UTC
See c7338f5cdd for history of this.