mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
lib/param: fix usage of 'write list = +Group'
metze Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri Aug 24 11:28:17 CEST 2012 on sn-devel-104
This commit is contained in:
parent
cbecd1595c
commit
f83521a4ca
@ -1355,13 +1355,19 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
|
|||||||
char **new_list = str_list_make(mem_ctx,
|
char **new_list = str_list_make(mem_ctx,
|
||||||
pszParmValue, NULL);
|
pszParmValue, NULL);
|
||||||
for (i=0; new_list[i]; i++) {
|
for (i=0; new_list[i]; i++) {
|
||||||
if (new_list[i][0] == '+' && new_list[i][1]) {
|
if (*(const char ***)parm_ptr != NULL &&
|
||||||
|
new_list[i][0] == '+' &&
|
||||||
|
new_list[i][1])
|
||||||
|
{
|
||||||
if (!str_list_check(*(const char ***)parm_ptr,
|
if (!str_list_check(*(const char ***)parm_ptr,
|
||||||
&new_list[i][1])) {
|
&new_list[i][1])) {
|
||||||
*(const char ***)parm_ptr = str_list_add(*(const char ***)parm_ptr,
|
*(const char ***)parm_ptr = str_list_add(*(const char ***)parm_ptr,
|
||||||
&new_list[i][1]);
|
&new_list[i][1]);
|
||||||
}
|
}
|
||||||
} else if (new_list[i][0] == '-' && new_list[i][1]) {
|
} else if (*(const char ***)parm_ptr != NULL &&
|
||||||
|
new_list[i][0] == '-' &&
|
||||||
|
new_list[i][1])
|
||||||
|
{
|
||||||
str_list_remove(*(const char ***)parm_ptr,
|
str_list_remove(*(const char ***)parm_ptr,
|
||||||
&new_list[i][1]);
|
&new_list[i][1]);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user