summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-02-06 08:58:20 +0300
committerAlexander Bokovoy <ab@samba.org>2008-02-06 08:58:20 +0300
commitd022ed3eecbe4c3bd0c93ee09608c43048e6881a (patch)
treee1d22eead92455edbcccbd291694bf7354b83b5b /source3/param/loadparm.c
parentd3ee93596f574be2d0263efb92b2c38cf47a1a9d (diff)
parentb3f48266f353fb93fee35bdcadaec3abc0fe0122 (diff)
downloadsamba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.tar.gz
samba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.tar.bz2
samba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into dmapi-integration
(This used to be commit f59d3786abcc53065c838a2fa82ec2f4b577b16f)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index c1d26af989..8edd32e937 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1691,7 +1691,7 @@ static void init_globals(bool first_time_only)
Globals.bWinbindTrustedDomainsOnly = False;
Globals.bWinbindNestedGroups = True;
Globals.winbind_expand_groups = 1;
- Globals.szWinbindNssInfo = str_list_make("template", NULL);
+ Globals.szWinbindNssInfo = str_list_make(NULL, "template", NULL);
Globals.bWinbindRefreshTickets = False;
Globals.bWinbindOfflineLogon = False;
@@ -2397,7 +2397,7 @@ const char **lp_parm_string_list(int snum, const char *type, const char *option,
return (const char **)def;
if (data->list==NULL) {
- data->list = str_list_make(data->value, NULL);
+ data->list = str_list_make(NULL, data->value, NULL);
}
return (const char **)data->list;
@@ -2494,9 +2494,10 @@ static void free_service(service *pservice)
PTR_DIFF(parm_table[i].ptr, &sDefault)));
else if (parm_table[i].type == P_LIST &&
parm_table[i].p_class == P_LOCAL)
- str_list_free((char ***)
- (((char *)pservice) +
- PTR_DIFF(parm_table[i].ptr, &sDefault)));
+ TALLOC_FREE(*((char ***)
+ (((char *)pservice) +
+ PTR_DIFF(parm_table[i].ptr,
+ &sDefault))));
}
data = pservice->param_opt;
@@ -2506,7 +2507,7 @@ static void free_service(service *pservice)
DEBUG(5,("[%s = %s]\n", data->key, data->value));
string_free(&data->key);
string_free(&data->value);
- str_list_free(&data->list);
+ TALLOC_FREE(data->list);
pdata = data->next;
SAFE_FREE(data);
data = pdata;
@@ -2566,7 +2567,7 @@ static int add_a_service(const service *pservice, const char *name)
while (data) {
string_free(&data->key);
string_free(&data->value);
- str_list_free(&data->list);
+ TALLOC_FREE(data->list);
pdata = data->next;
SAFE_FREE(data);
data = pdata;
@@ -3275,8 +3276,9 @@ static void copy_service(service * pserviceDest, service * pserviceSource,
strupper_m(*(char **)dest_ptr);
break;
case P_LIST:
- str_list_free((char ***)dest_ptr);
- str_list_copy((char ***)dest_ptr, *(const char ***)src_ptr);
+ TALLOC_FREE(*((char ***)dest_ptr));
+ str_list_copy(NULL, (char ***)dest_ptr,
+ *(const char ***)src_ptr);
break;
default:
break;
@@ -3299,7 +3301,7 @@ static void copy_service(service * pserviceDest, service * pserviceSource,
/* If we already have same option, override it */
if (strcmp(pdata->key, data->key) == 0) {
string_free(&pdata->value);
- str_list_free(&data->list);
+ TALLOC_FREE(data->list);
pdata->value = SMB_STRDUP(data->value);
not_added = False;
break;
@@ -3774,8 +3776,8 @@ static bool handle_netbios_scope(int snum, const char *pszParmValue, char **ptr)
static bool handle_netbios_aliases(int snum, const char *pszParmValue, char **ptr)
{
- str_list_free(&Globals.szNetbiosAliases);
- Globals.szNetbiosAliases = str_list_make(pszParmValue, NULL);
+ TALLOC_FREE(Globals.szNetbiosAliases);
+ Globals.szNetbiosAliases = str_list_make(NULL, pszParmValue, NULL);
return set_netbios_aliases((const char **)Globals.szNetbiosAliases);
}
@@ -4099,7 +4101,7 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
/* If we already have same option, override it */
if (strcmp(data->key, param_key) == 0) {
string_free(&data->value);
- str_list_free(&data->list);
+ TALLOC_FREE(data->list);
data->value = SMB_STRDUP(pszParmValue);
not_added = False;
break;
@@ -4192,8 +4194,9 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
break;
case P_LIST:
- str_list_free((char ***)parm_ptr);
- *(char ***)parm_ptr = str_list_make(pszParmValue, NULL);
+ TALLOC_FREE(*((char ***)parm_ptr));
+ *(char ***)parm_ptr = str_list_make(
+ NULL, pszParmValue, NULL);
break;
case P_STRING:
@@ -4812,8 +4815,9 @@ static void lp_save_defaults(void)
continue;
switch (parm_table[i].type) {
case P_LIST:
- str_list_copy(&(parm_table[i].def.lvalue),
- *(const char ***)parm_table[i].ptr);
+ str_list_copy(
+ NULL, &(parm_table[i].def.lvalue),
+ *(const char ***)parm_table[i].ptr);
break;
case P_STRING:
case P_USTRING:
@@ -5647,7 +5651,7 @@ void gfree_loadparm(void)
string_free( (char**)parm_table[i].ptr );
}
else if (parm_table[i].type == P_LIST) {
- str_list_free( (char***)parm_table[i].ptr );
+ TALLOC_FREE( *((char***)parm_table[i].ptr) );
}
}
}
@@ -5687,7 +5691,7 @@ bool lp_load(const char *pszFname,
while (data) {
string_free(&data->key);
string_free(&data->value);
- str_list_free(&data->list);
+ TALLOC_FREE(data->list);
pdata = data->next;
SAFE_FREE(data);
data = pdata;