s3: smbd: fix regression with non-wide symlinks to directories over SMB3.
commitacc16592b451905dabc093f1d261e93cd3b59520
authorDaniel Kobras <d.kobras@science-computing.de>
Fri, 23 Jun 2017 13:39:21 +0000 (23 15:39 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 26 Jun 2017 21:16:13 +0000 (26 23:16 +0200)
treec296cde2b24698da154172601b2541f0b0ba896b
parentf1f388ef80a6516c2f44b7778420f8ffe28c6471
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>
selftest/knownfail.d/samba3.blackbox.smbclient_s3.follow_local_symlinks [deleted file]
source3/smbd/open.c