Het real path of a share.

Andrew Bartlett abartlet at samba.org
Wed Feb 13 16:02:18 MST 2013


On Wed, 2013-02-13 at 22:45 +0100, Stef Bon wrote:
> 2013/2/13 simo <idra at samba.org>:
> > On Wed, 2013-02-13 at 16:00 +0100, Stef Bon wrote:
> >> Hi,
> >>
> >> I'm writing a fs notify system (notifyfs) which I want to work with
> >> network filesystems like sshfs, cifs and nfs.
> >> With cifs I use the following format:
> >>
> >> cifs:/public/some/path
> >>
> >> where public is the name of the share.
> >>
> >> Is it possible to parse this name and get the path, besides just
> >> parsing the smb.conf directory?
> >
> > Please do not invent your own URL scheme, there is an old draft that you
> > should probably use here:
> > https://tools.ietf.org/id/draft-crhertel-smb-url-12.txt
> >
> 
> Why not. I think you are not aware what I mean here. It's an url for
> internal use only. I'm not suggesting anything generic for common use.

We still strongly discourage the creating of new url schemes, as once
started these things are really, really hard to stop.  

> > If you use this scheme you'll be able to correctly parse the URL.
> >
> > As for your request, I guess what you are asking is if you can obtain
> > the actual path on the file server and not the path relative to the
> > share.
> >
> > The answer is 'maybe', it depends on the share and whether there are vfs
> > modules loaded. In a samba server a share can even be completely
> > synthetic.
> > Besides there is no need for something like notifyfs for the cifs
> > protocol, because the protocol already handles notifications on it's
> > own, and done the right way (with proper access control and semantics)
> 
> You say there is no need. This is not true. Maybe Samba handles change
> notify request like they should, but the filesystem for linux, cifs ,
> do not. 

Shouldn't that be handled as a bug against cifsfs?  

> So on linux, since to make it work the local fseven system
> (apps connect to), the filesystem and the backend should support it.
> Right now only the samba server supports it.
> 
> I'm developing a service which can provide some simple fsevent
> notification, bypassing the network filesystems. This is not how it
> should work, I know, but I will be very happy whenI get this working.

This sounds like something heading for a correctness, authentication and
authorization disaster, and I strongly urge you to reconsider.  How will
you tie a particular file descriptor between the two channels,
particularly across renames?

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list