hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
commit1beb5b382fbe5787370c6a3b1fcf4ec42ac5572f
treef0c37141396a8d6a32a8991cc78872d95464e986
parent5746688996818a8d3d3ab35fd29273417c45bd0d
hurd: Fix O_DIRECTORY | O_NOFOLLOW

Appending / to the path to be looked up makes us always follow a final
symlink, even with O_NOTRANS (since the final resolution is after the
'/').  In the O_DIRECTORY | O_NOFOLLOW case, we thus have to really open
the node and stat it, which we already do anyway, and check for
directory type.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-NOFOLLOW-DIRECTORY.diff
hurd/hurdlookup.c
hurd/lookup-retry.c