[PATCH] smbd: add reparse points at symlinks

Jeremy Allison jra at samba.org
Thu Dec 3 01:08:51 UTC 2015

On Wed, Dec 02, 2015 at 11:28:49AM -0700, Jacob Holtom wrote:
> with follow symlinks and wide links enabled, they normally would
> just see it as a continuation of the current path rather than a
> point to another location
> Sadly, the documentation on what the windows symlink filter driver
> does is rather lacking, so the best I can do is make informed
> assumptions.
> Now when they connect and encounter a reparse point with the
> IO_REPARSE_TAG_SYMLINK they will interpret it as the start of a new
> path and therefore re-evaluate everything (probably a new
> tree_connect at that point) rather than inheriting everything above
> it.  This is mostly useful in the case of wide links, so that
> instead of inheriting the original filesystems attributes, it goes
> and finds those of the target filesystems.

So in order to implement this fully we'll need the symlink
return code in the smbd ioctl path, and it seems a good
time to do the symlink set path too.

Now, should we make Windows symlinks differ from UNIX
symlinks on the server - i.e. store what the client
sends with a prefix of mssym: instead of allowing
a direct write to the symlink data on the server ?

This would be similar to what we do with DFS links,
we store them as symlinks on the server but with
a prefix of msdfs: before the stored data, which
stops code running on the server from accidently
following them.

Personally I think that's a good idea.

Then of course we'll need a lot of tests :-).

More information about the samba-technical mailing list