ldap_search_ext_s and non-const attrs parameter

"Haszlakiewicz, Eric" <[email protected]>
Newsgroups gmane.network.openldap.general
Message-ID <9D29FD18CBD74A478CBA86E6EF6DBAD404C2D70B@CHI4EVS04.corp.transunion.com>
I am using ldap_search_ext_s with an attrs parameter that looks
something like this:
const char* attrs[] = { "cn", "statusCode", NULL };

Previously, I did not have the const qualifier on there, but I increased
the warning level of my compiler, and it was (correctly) complaining
that I was treating string constants as non-constant.

Unfortunately, the ldap_search_ext_s function is declared *without* the
const qualifier:

LDAP_F( int )
ldap_search_ext_s LDAP_P((
	LDAP			*ld,
	LDAP_CONST char	*base,
	int				scope,
	LDAP_CONST char	*filter,
	char			**attrs,         <------ here
	int				attrsonly,
	LDAPControl		**serverctrls,
	LDAPControl		**clientctrls,
	struct timeval	*timeout,
	int				sizelimit,
	LDAPMessage		**res ));

Does this mean that I really do need to pass in mutable buffers, or is
the API incorrect?  If it needs to be mutable, under what conditions
will those be changed, and do I need to re-initialize the values after
every call?
I notice that other ldap libraries (e.g. IBM's Tivoli Directory Server)
*do* use const for that parameter.

eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.