summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/smbconf/smbconf_txt_simple.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/lib/smbconf/smbconf_txt_simple.c b/source3/lib/smbconf/smbconf_txt_simple.c
index 1ce9069020..bd7693047c 100644
--- a/source3/lib/smbconf/smbconf_txt_simple.c
+++ b/source3/lib/smbconf/smbconf_txt_simple.c
@@ -121,8 +121,14 @@ static bool smbconf_txt_do_parameter(const char *param_name,
struct txt_cache *cache = tpd->cache;
if (cache->num_shares == 0) {
- /* not in any share ... */
- return false;
+ /*
+ * not in any share yet,
+ * initialize the "empty" section (NULL):
+ * parameters without a previous [section] are stored here.
+ */
+ if (!smbconf_txt_do_section(NULL, private_data)) {
+ return false;
+ }
}
param_names = cache->param_names[cache->current_share];