[Samba] %S Macro seems broken in default service
I am having trouble with the %S Macro being expanded to an unexpected value. We have a section of disk where each directory under that directory is to be it's own share. This looks like: /export/ /export/share1 /export/share2 . . /export/shareN Rather than listing each share uniquely in the smb.conf, we put this in the global section: default service = export along with all of our defaults and settings. Then we have the export service the default service refers to: [export] path = /export/%S writeable = yes browseable = no On previous samba versions (3.4.7 is one that I checked), it works fine. Now on 4.0.5 and 4.0.6 on Fedora 18, it no longer works. Before -- if a user asked for \\server\share1, %S would be set to share1 and Samba would look for /export/share1. Now, it appears that %S contains export since the logs give errors that it cannot find the path /export/export. It's almost like the requested service is being changed to export (like you would want default service to do), but the name that the user supplied is also being overwritten, so that I can't see what share the user wanted. Does anyone know if this is intentional, or a bug? I don't see any references to others having the problem, so I'm wondering if I've missed something in the transition to 4.0 that needs to be done. Note that IF I list each share in the smb.conf file as [share1] path = /export/share1 writeable = yes browsable = no then everything works fine, so I think it's just the macro expansion that is giving me fits. Thanks for any help, -Ty -- -===- Ty Boyack NREL Senior IT Engineer ty.boy...@colostate.edu (970) 491-1186 -===- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] %S Macro seems broken in default service
On Fri, 2013-06-07 at 14:37 -0600, Ty! Boyack wrote: Does anyone know if this is intentional, or a bug? I don't see any references to others having the problem, so I'm wondering if I've missed something in the transition to 4.0 that needs to be done. It's a bit of both. See https://bugzilla.samba.org/show_bug.cgi?id=8935 That is, it wasn't anticipated that folks would use %S in this way, and the change avoids clients being able to consume memory as we re-interpret the service for each incoming name. Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] %S Macro seems broken in default service
That's great info -- thanks. I will start following that bug report with great interest. I can see where the issue is and how this could be a serious problem. It will be good to see how it is fixed. One suggestion that I'll make both here and over there (I don't know if you have any pull on this), is that this feature is documented in the 4.0 man pages. In smb.conf(5) it says: Also note that the apparent service name will be changed to equal that of the requested service, this is very useful as it allows you to use macros like %S to make a wildcard service. I'd like to see the feature available again (maybe with an understanding of risk that it can entail), but if not then that description should probably be struck from the documentation. Thanks for the spot-on tip of where the bug is and the issues surrounding it! -Ty! On 06/07/2013 04:02 PM, Andrew Bartlett wrote: On Fri, 2013-06-07 at 14:37 -0600, Ty! Boyack wrote: Does anyone know if this is intentional, or a bug? I don't see any references to others having the problem, so I'm wondering if I've missed something in the transition to 4.0 that needs to be done. It's a bit of both. See https://bugzilla.samba.org/show_bug.cgi?id=8935 That is, it wasn't anticipated that folks would use %S in this way, and the change avoids clients being able to consume memory as we re-interpret the service for each incoming name. Andrew Bartlett -- -===- Ty Boyack NREL Senior IT Engineer ty.boy...@colostate.edu (970) 491-1186 -===- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba