]> git.ipfire.org Git - thirdparty/samba.git/commit
s3: smbd: fix regression with non-wide symlinks to directories over SMB3.
authorDaniel Kobras <d.kobras@science-computing.de>
Fri, 23 Jun 2017 13:39:21 +0000 (15:39 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 28 Jun 2017 09:20:08 +0000 (11:20 +0200)
commitecdbe6e7b9bf25fd9a6813a3247386eb1eff2582
tree2d141a754593e3d4a66aa31202a8ae1f079aa18d
parentbb6c6c6353c4c0c0af91d55bb21c7069947572fe
s3: smbd: fix regression with non-wide symlinks to directories over SMB3.

The errno returned by open() is ambiguous when called with flags O_NOFOLLOW and
O_DIRECTORY on a symlink. With ELOOP, we know for certain that we've tried to
open a symlink. With ENOTDIR, we might have hit a symlink, and need to perform
further checks to be sure. Adjust non_widelink_open() accordingly. This fixes
a regression where symlinks to directories within the same share were no
longer followed for some call paths on systems returning ENOTDIR in the above
case.

Also remove the knownfail added in previous commit.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12860

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit acc16592b451905dabc093f1d261e93cd3b59520)
selftest/knownfail
source3/smbd/open.c