mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
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 commit is contained in:
committed by
Gerald (Jerry) Carter
parent
a7df3b5f06
commit
543799fc0d
@ -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))",
|
||||
|
Reference in New Issue
Block a user