Bug 138555 - ini parser for smb.conf does not handle include parameter correctly
Summary: ini parser for smb.conf does not handle include parameter correctly
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Alpha 1
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jiří Suchomel
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-14 14:56 UTC by Guenther Deschner
Modified: 2006-01-04 13:45 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
patch for /usr/share/YaST2/scrconf/cfg_smbconf.scr (541 bytes, patch)
2005-12-15 10:30 UTC, Jiří Suchomel
Details | Diff
patch for /usr/share/YaST2/modules/SambaConfig.pm (3.85 KB, patch)
2005-12-15 10:31 UTC, Jiří Suchomel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guenther Deschner 2005-12-14 14:56:55 UTC
When using yast2-samba-client (this will apply to other modules as well), the ini parser does not handle include files correctly. 

When you have several include parameters in your smb.conf ([global] section) and some are commented out (with a leading #) then only the last active include parameter survives.

Example:
------------------------
[global]
   foo = bar
   bar = foo
   include = /tmp/test1
#   include = /tmp/test2
#   include = /tmp/test3
   foobar = yes
   barfoo = no
   include = /tmp/test4
-------------------------

After yast2 has modified a parameter in that file, only 
   "include = /tmp/test4" 
is still in the configuration file, all other include paramters are deleted.
Comment 1 Jiří Suchomel 2005-12-14 16:19:40 UTC
smb agent probably don't expect non-unique keys
Comment 2 Jiří Suchomel 2005-12-15 09:45:03 UTC
It might be possible to adapt smb ini-agent to do not break such config file. But I hope you don't expect that the included files will be parsed.
Comment 3 Jiří Suchomel 2005-12-15 10:30:54 UTC
Created attachment 60954 [details]
patch for /usr/share/YaST2/scrconf/cfg_smbconf.scr

patch for agent definition
Comment 4 Jiří Suchomel 2005-12-15 10:31:35 UTC
Created attachment 60955 [details]
patch for /usr/share/YaST2/modules/SambaConfig.pm

... and patch for module
Comment 5 Jiří Suchomel 2005-12-15 10:31:56 UTC
could you test how it works with patches?
Comment 6 Jiří Suchomel 2005-12-20 14:52:57 UTC
Current yast2-samba-client from STABLE (2.13.1) already includes this patch.
Comment 7 Jiří Suchomel 2006-01-04 13:45:20 UTC
Hmm, no response -> FIXED.