hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 5 Jan 2018 18:09:39 +0000 (18:09 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 5 Jan 2018 18:09:39 +0000 (18:09 +0000)
commitbf1776bb5ac60359888bb12c439748a2e0257ad6
treedff4e6d65f3e4c90cbabcf49f56d30ea688d4f9b
parentf2cd7f4c111cbc07fc9bac198b8be44626708607
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