Full_Name: Russ Allbery Version: 2.4.7 OS: Debian GNU/Linux URL: Submission from: (NULL) (171.66.157.14)
The ldap_get_dn man page has the following prototype for ldap_str2dn:
int ldap_str2dn( const char *str, LDAPDN **dn, unsigned flags )
However, ldap.h has:
LDAP_F( int ) ldap_str2dn LDAP_P(( LDAP_CONST char *str, LDAPDN *dn, unsigned flags ));
Note the difference for the second argument. This is related to, later in the man page:
typedef struct ldap_ava { char *la_attr; struct berval *la_value; unsigned la_flags; } LDAPAVA;
typedef LDAPAVA** LDAPRDN; typedef LDAPRDN** LDAPDN;
but ldap.h says:
typedef struct ldap_ava { struct berval la_attr; struct berval la_value; unsigned la_flags; void *la_private; } LDAPAVA;
typedef LDAPAVA** LDAPRDN; typedef LDAPRDN* LDAPDN;
Note the type difference for LDAPDN (which explains the earlier varience) and for la_attr.
Original Debian bug report: http://bugs.debian.org/465024