In an effort to selectively show shares to users (browseable) I've made smb.conf.%U files in which I set the browseable flag for shares that users can view. Works well, until I discovered it breaks the VFS recycle. Shortened confs: ---------------- smb.conf: [Share] browseable = no path = /share valid users = user vfs objects = recycle recycle:keeptree = true recycle:versions = true [global] include = /etc/samba/smb.conf.%U smb.conf.user: [Share] browseable = yes -- The problem is, that keeptree and versions settings are lost this way -- that is no versioning and no keep-tree. The new browseable flag, and other settings I've made (comment etc. before the include) seem to work/stay nicely. Recycling is quite vital IMO, and selectively showing shares is also something I'd very-very much like to continue to use -- for overcoming the limited log-in capabilities of Windows.
When the vfs objects section is duplicated to the user's smb.conf, recycle works. So it'd be nice if the inheritance in include files would be either on by default or optional in the future -- manually copying the recycle section too all sub-confs would be pretty redundant.
And that's bad, right. And if I think about modules like full audit or traffic analyzer, I think it's particulary bad. I took a sneak peek into the sources of master and I am almost sure this doesn't work. However let me first reproduce this just to make sure. Stay tuned.
Sucessfully reproduced on master.
I am a bit on a dead end here. I am testing this using both the code and also check this via testparm. Like in the initial report, in my included file I have a "redefinition" of a share, and my expectation was that the options there are inherited. Testparm says: Processing section "[pool]" Processing section "[pool]" indicating that it processes both service definitions. However, in contrast to the initial report, the option I have set in the included file: "browseable = yes" is ignored and not inherited when running testparm. So I am currently not really sure what the planned behaviour should be. Is this supposed to work at all? As long as I am not sure of this, I have no pointer to deeper dig into copy_service() and friends. The initial problem is still there, the parametric options for a vfs module are lost as soon as a service is redefined in an included file.
You might want to take a look at param/loadparm.c:6110ff. This seems to be intentional. Not sure what happens when this is removed. Volker
This is confusing to me. My smb.conf has three service definitions, and the only service add_a_service is running through is "homes". Service "[tmp]" and "[pool]" don't seem to be involved with this function. Therefore I guess the removal of the lines Volker mentioned don't change anything.
Created attachment 5462 [details] smb.conf
and /etc/samba/blah.conf is just: [pool] browseable = yes