1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

libsmbconf: default to the NULL section when a parameter is encountered w/o section

Michael
This commit is contained in:
Michael Adam 2008-04-15 14:37:15 +02:00
parent cb23052b20
commit e1b98f1cbc

View File

@ -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];