From f51677051cc139bdeb9d66196ca5405cecce1a35 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 17 Feb 2005 14:27:34 +0000 Subject: r5428: Apply some const. LDAP attribs should now be declared const char *attr[]. This gives some new warnings in smbldap.c, but a the callers are cleaned up. Volker (This used to be commit 543799fc0ddc3176469acc1fab7093c41556d403) --- source3/lib/smbldap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 7aeecb89d6..ee03295e72 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -230,16 +230,16 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { Return the list of attribute names from a mapping table **********************************************************************/ - char** get_attr_list( ATTRIB_MAP_ENTRY table[] ) + const char** get_attr_list( ATTRIB_MAP_ENTRY table[] ) { - char **names; + const char **names; int i = 0; while ( table[i].attrib != LDAP_ATTR_LIST_END ) i++; i++; - names = SMB_MALLOC_ARRAY( char*, i ); + names = SMB_MALLOC_ARRAY( const char*, i ); if ( !names ) { DEBUG(0,("get_attr_list: out of memory\n")); return NULL; @@ -259,7 +259,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { Cleanup ********************************************************************/ - void free_attr_list( char **list ) + void free_attr_list( const char **list ) { int i = 0; @@ -1017,7 +1017,7 @@ static int another_ldap_try(struct smbldap_state *ldap_state, int *rc, int smbldap_search(struct smbldap_state *ldap_state, const char *base, int scope, const char *filter, - char *attrs[], int attrsonly, + const char *attrs[], int attrsonly, LDAPMessage **res) { int rc = LDAP_SERVER_DOWN; @@ -1154,7 +1154,7 @@ int smbldap_extended_operation(struct smbldap_state *ldap_state, run the search by name. ******************************************************************/ int smbldap_search_suffix (struct smbldap_state *ldap_state, const char *filter, - char **search_attr, LDAPMessage ** result) + const char **search_attr, LDAPMessage ** result) { int scope = LDAP_SCOPE_SUBTREE; int rc; @@ -1261,7 +1261,7 @@ static NTSTATUS add_new_domain_info(struct smbldap_state *ldap_state, int ldap_op; LDAPMessage *result = NULL; int num_result; - char **attr_list; + const char **attr_list; uid_t u_low, u_high; gid_t g_low, g_high; uint32 rid_low, rid_high; @@ -1376,7 +1376,7 @@ NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state, NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; pstring filter; int rc; - char **attr_list; + const char **attr_list; int count; pstr_sprintf(filter, "(&(objectClass=%s)(%s=%s))", -- cgit