Bug 138555

Summary: ini parser for smb.conf does not handle include parameter correctly
Product: [openSUSE] SUSE Linux 10.1 Reporter: Guenther Deschner <gd>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: samba-maintainers
Version: Alpha 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: patch for /usr/share/YaST2/scrconf/cfg_smbconf.scr
patch for /usr/share/YaST2/modules/SambaConfig.pm

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.