summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-02-17 14:27:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:40 -0500
commitf51677051cc139bdeb9d66196ca5405cecce1a35 (patch)
tree536ceecd495b125ba73fa0bf622ac91ae5db71ae /source3/lib
parentbc10e4067a0c1985d81e3756c7dd7c23f09c1be0 (diff)
downloadsamba-f51677051cc139bdeb9d66196ca5405cecce1a35.tar.gz
samba-f51677051cc139bdeb9d66196ca5405cecce1a35.tar.bz2
samba-f51677051cc139bdeb9d66196ca5405cecce1a35.zip
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)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/smbldap.c16
1 files changed, 8 insertions, 8 deletions
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))",