What is the guarantee around path names in calls to VFS functions

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Jun 25 00:30:59 MDT 2015

On Wed, Jun 24, 2015 at 10:04:27PM -0700, Richard Sharpe wrote:
> Hi folks,
> I thought that the guarantee was that the paths passed to VFS
> functions is that they would be relative to the root of the share.
> This would be a nice guarantee. Or else, it would be nice if they were
> all absolute paths.
> However, it seems that sometimes they are relative to the root of the
> share, and sometimes they are absolute and sometimes they are even
> outside the share path.
> Examples include calls to SMB_VFS_NEXT_XXX in, say, vfs_shadow_copy2.c
> when a path in the snapshot file system is constructed, or paths in
> the vfs_streams_depot.c module when you place them outside the share
> directory so users cannot clobber them.

Well, the whole point of shadow_copy2 is to make paths
outside the share available as snapshots. How would you make
that functionality available if not by accessing paths
outside the share? I would really, really be curious how
your installation can do this. Do you have special APIs to
access snapshots outside the share path given only paths
within the share path? I've been deep inside shadow_copy2,
and I would *LOVE* to know about that API.

Thanks a lot in advance for this information!!!


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list