libsmbconf: activate the verbatim-flag in text backend: store parameters as they...
authorMichael Adam <obnox@samba.org>
Mon, 7 Apr 2008 20:49:11 +0000 (22:49 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 9 Apr 2008 23:28:57 +0000 (01:28 +0200)
with verbatim == true, parameters are stored as they come from the input file,
duplicates are listed multiple times, etc.

Michael

source/lib/smbconf/smbconf_txt_simple.c

index f734eab5528757d023d20d9838500484898d557c..e87cd04d16f638a7357cd6b9c8d79d238bbc4c1a 100644 (file)
@@ -129,7 +129,8 @@ static bool smbconf_txt_do_parameter(const char *param_name,
        param_values = cache->param_values[cache->current_share];
        num_params   = cache->num_params[cache->current_share];
 
-       if (smbconf_find_in_array(param_name, param_names, num_params, &idx))
+       if (!(tpd->verbatim) &&
+           smbconf_find_in_array(param_name, param_names, num_params, &idx))
        {
                TALLOC_FREE(param_values[idx]);
                param_values[idx] = talloc_strdup(cache, param_value);