The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4e29933d0936fd053f7591ee118dc1fc42617514
commit 4e29933d0936fd053f7591ee118dc1fc42617514 Author: Mateusz Guzik <[email protected]> AuthorDate: 2021-02-02 18:06:56 +0000 Commit: Mateusz Guzik <[email protected]> CommitDate: 2021-02-02 18:15:48 +0000 cache: fix trailing slash support in face of permission problems Reported by: Johan Hendriks <joh.hendriks gmail.com> Tested by: kevans (cherry picked from commit 45456abc4ce71053d07cf03ca63bd1ce459fec55) --- sys/kern/vfs_cache.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 1780e8235dd3..fe7e70ba1359 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -5494,6 +5494,16 @@ cache_fplookup_failed_vexec(struct cache_fpl *fpl, int error) dvp = fpl->dvp; dvp_seqc = fpl->dvp_seqc; + /* + * TODO: Due to ignoring slashes lookup will perform a permission check + * on the last dir when it should not have. If it fails, we get here. + * It is possible possible to fix it up fully without resorting to + * regular lookup, but for now just abort. + */ + if (cache_fpl_istrailingslash(fpl)) { + return (cache_fpl_aborted(fpl)); + } + /* * Hack: delayed name len checking. */ _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
