hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +0000)
committerSamuel Thibault <sthibault@debian.org>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +0000)
commitea7c57fd0060caca2a816e6fd0ae7a36e446c3d2
tree6f796b911c04957c6899835e85e6fb309d17e534
parent49076d6f58069960c171d0bb15d8c4bcc06b7357
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