hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 29 Nov 2017 03:00:21 +0000 (03:00 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Wed, 29 Nov 2017 03:00:21 +0000 (03:00 +0000)
commit02d4187d780367a3c7d81219786e8a6d569adb4a
treed92ca5562e1b84b849a08cc7c23856ece5b1d025
parentc4007037c3a8776cdc80d782a02c4aa96272e03c
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