Appending a slash and either one or two dots to an executable file is not producing errors about the file not being a directory as it does on FreeBSD 12. For example. ls -l /bin/df/.. will actually list the contents of /bin. I might have assumed this was some odd historical quirk but testing FreeBSD 12.3 and 12.4, they don't exhibit this behaviour. I see the issue on 13.1 but have confirmed that it isn't specific to me or my system. I found this because a Makefile was checking for the existence of file/. to test whether something is a file or a directory. For what it's worth, this works correctly on Solaris and Linux.
As of FreeBSD 13.2-STABLE #0 stable/13-dc1ba2a43 I can confirm this bug is present on said system.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c16c4ea6d399332d4a023df6e423be61fdb875a5 commit c16c4ea6d399332d4a023df6e423be61fdb875a5 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-03-23 19:19:48 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-03-23 19:31:18 +0000 vfs cache: return ENOTDIR for not_a_dir/{.,..} lookups Reported by: Oliver Kiddle PR: 270419 MFC: 3 days sys/kern/vfs_cache.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
Hello, confirmed and fixed: https://cgit.FreeBSD.org/src/commit/?id=c16c4ea6d399332d4a023df6e423be61fdb875a5 will make sure it lands in 13.2
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5d83656c09f522d6bf4f1050be60f270ddef04af commit 5d83656c09f522d6bf4f1050be60f270ddef04af Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-03-23 19:19:48 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-03-23 19:59:08 +0000 vfs cache: return ENOTDIR for not_a_dir/{.,..} lookups Reported by: Oliver Kiddle PR: 270419 MFC: 3 days (cherry picked from commit c16c4ea6d399332d4a023df6e423be61fdb875a5) sys/kern/vfs_cache.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
A commit in branch releng/13.2 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=276e405a50d36229df308642b30e6e66372d39f2 commit 276e405a50d36229df308642b30e6e66372d39f2 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-03-23 19:19:48 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-03-23 20:22:20 +0000 vfs cache: return ENOTDIR for not_a_dir/{.,..} lookups Reported by: Oliver Kiddle PR: 270419 MFC: 3 days Approved by: re (gjb) (cherry picked from commit c16c4ea6d399332d4a023df6e423be61fdb875a5) (cherry picked from commit 5d83656c09f522d6bf4f1050be60f270ddef04af) sys/kern/vfs_cache.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
All relevant commits landed: - fix to main - fix to stable/13 - fix to upcomming 13.2 as such I'm closing this bz thanks for reporting