hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 21 Nov 2017 23:14:20 +0000 (23:14 +0000)
committerAurelien Jarno <aurel32@debian.org>
Tue, 21 Nov 2017 23:14:20 +0000 (23:14 +0000)
commitd23876aeec4de10b0df2d78521e233cfae6bc893
treef0bc1d657030ba599d7c581f482aadd26a9ba3ab
parent9bec9740855f7a42eb75ee6efacb2b777df032f7
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