VFS: masquerading lstat as stat - dangerous?

Jeremy Allison jra at samba.org
Fri Sep 30 19:01:50 GMT 2005


On Fri, Sep 30, 2005 at 02:50:14AM -0500, Sean Dunn wrote:
> In my testing, having all lstat calls just call SMB_VFS_NEXT_STAT
> instead of SMB_VFS_NEXT_LSTAT works great, even when the underlying file
> is really a link.. I did this because I don't want the client to know
> the difference between a link and a directory, but is this inherently
> dangerous, or am I breaking a rule someplace? My logic is that stat()
> calls in Linux transparently traverse a link to a target directory, so
> this should be fine.. but, because I'm still relatively new to this, I
> thought I'd ask.

This would defeat things like the "wide links" parameter, so long
as you're ok with this....

Jeremy.


More information about the samba-technical mailing list