hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 4 Sep 2018 19:13:02 +0000 (20:13 +0100)
committerSamuel Thibault <sthibault@debian.org>
Tue, 4 Sep 2018 19:13:02 +0000 (20:13 +0100)
commit541ff41d08ddb770ea0b51abbed8989ca1a973e9
tree39e7cee2495da1fa68ab8b83f81249018af51f90
parentb92bd7e87d0a1dc0ad3bd9b3848ce02a20fdac49
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