hurd: Fix O_DIRECTORY | O_NOFOLLOW
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
commit34a2c3f281cb2effd3de4b469815e537f3b02733
tree4be0b69694b20dd9262b02a2ea306b878fb3c258
parent81083b85f4d89f40f7c8e8f1d4965ecdbcfc5f05
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