diff options
author | Michael Adam <obnox@samba.org> | 2008-04-15 14:37:15 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-15 17:40:27 +0200 |
commit | 34e8ec54ce46a620515836b0d584dc1f59522e37 (patch) | |
tree | 2c917581b316f82272a715d740586abd8a2e78d6 /source3/lib/smbconf | |
parent | e700800720aec4b9a85a5c3cbc95cd78a03defaa (diff) | |
download | samba-34e8ec54ce46a620515836b0d584dc1f59522e37.tar.gz samba-34e8ec54ce46a620515836b0d584dc1f59522e37.tar.bz2 samba-34e8ec54ce46a620515836b0d584dc1f59522e37.zip |
libsmbconf: default to the NULL section when a parameter is encountered w/o section
Michael
(This used to be commit e1b98f1cbce72d12085d86da834f0949ecbfbf67)
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf_txt_simple.c | 10 |
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]; |