[Date Prev][Date Next]
Re: LDAP_DEPRECATED in 2.3.X
On Tuesday 18 October 2005 19:10, Kurt D. Zeilenga wrote:
> At 07:43 AM 10/18/2005, Ralf Haferkamp wrote:
> >The 2.3 releases don't define LDAP_DEPRECATED anymore. This causes
> > problems with a lot of non-OpenLDAP software and I expect that many
> > users of libldap are not too happy about that especially because
> > the man-pages for many of the non-deprecated function are missing
> > or just refer to the deprecated calls (in fact I wonder why nobody
> > has complained here yet :) ).
> Maybe because defining -DLDAP_DEPRECATED in software that uses
> deprecated interfaces is not that big of a deal.
I agree, but it was my understanding that the deprecated functions might
be removed at sometime in the future. Are there any plans to do that?
> As far as missing man pages, the community has yet needed them
> badly enough to produce them (even though a few in the community
> have complained that they are missing). Maybe this will
> encourage some man page writing.
> >I know this has been discussed here already some time ago.
> Yes, and the decision at the time was to define LDAP_DEPRECATED
> in 2.2 release series.
> >And for most of
> >the deprecated calls I understand the reasons for deprecating them
> > (e.g. no support for controls or in case of ldap_simple_bind no
> > support for password containing zero-values octets). But for some
> > calls (e.g. for ldap_init() and ldap_value_free() ) I wonder what
> > the reasoning was to deprecate them. Could someone clarify this for
> > me?
> ldap_init: use ldap_initialize(3) instead. Aside from support
> for ldaps:// and ldapi://, ldap_initialize(3), unlike ldap_init(3),
> returns an indication of the nature of any error directly.
> ldap_values_free(3): use of character strings for values is
> deprecated as their use is quite bug prone as zero-valued
> octets are legal in many LDAP syntaxes. Note that NUL (U+0000)
> is a Unicode character. Bervals should be used instead (and,
> hence, ldap_value_len_free(3)).
Ok, but according to the C-API, stuff like referralsp (returned by
ldap_parse_result) which is still char** and not Berval should freed
using ldap_values_free. Which (non-deprecated) function should to be
used for this now. I've been using ber_memvfree lately, is that