hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 16 Jul 2018 20:23:13 +0000 (21:23 +0100)
committerAurelien Jarno <aurel32@debian.org>
Mon, 16 Jul 2018 20:23:13 +0000 (21:23 +0100)
commita51ea996463db3eebbe863095b88f2966cedd836
tree76719f70a907d1f79862a2bd6194d649027d6c1f
parent92f99bd8b31bb774fe91b255d76b7a5ffc64d59f
hurd: Fix O_DIRECTORY | O_NOFOLLOW

Appending / to the path to be looked up would make 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 git-NOFOLLOW-DIRECTORY.diff
hurd/hurdlookup.c
hurd/lookup-retry.c