[Samba] symlinks loop detection in Samba?
Giuseppe Lo Presti
Giuseppe.LoPresti at cern.ch
Mon Jan 18 13:12:33 UTC 2021
On 18/01/2021 11:58, Ralph Boehme wrote:
> Am 1/18/21 um 11:41 AM schrieb Giuseppe Lo Presti via samba:
>> Following an old thread at [1] I wonder whether there's been any
>> thought/plan to implement symbolic links loop detection in smbd.
>
> what do you mean? smbd will detect loops because the kernel tells us
> about loops with ELOOP.
Well, that's what I hoped, but facts match what Jeremy mentioned at the
time:
> the clients will see them [symlinks] as nested directories and request
> the server to follow them until the OS runs out of recursion
> depth and returns errors.
So no ELOOP is triggered, and requests just keep piling up from the client.
To reproduce, just create a link to '.' in a shared folder with `follow
symlinks = yes` and look at its properties from Windows (or copy it
over, but be ready to clean up the mess afterwards...).
>> From that thread it seems Jeremy had some ideas, not sure how this
>> went and whether there's some option I've missed that would do the trick.
>
> This is still being worked (SMB2 UNIX Extensions that is) -- any help is
> welcome! :)
Good to know, thanks! :)
Giuseppe
More information about the samba
mailing list