Created attachment 208226 [details] link type require the link keyword With a directory d/ containing the following 2 files: -rw-r--r-- 1 root wheel 14 Oct 10 11:55 hello.txt lrwxr-xr-x 1 root wheel 9 Oct 10 11:55 world.txt -> hello.txt using mtree to build a manifest as follow: mtree -ck mode -p ./d | mtree -C > no-link-kw.makefs-manifest here is the resulting manifest: . type=dir mode=0755 ./hello.txt type=file mode=0644 ./world.txt type=link mode=0755 running makefs as follow lead to segfault: cd d makefs -t ffs -o optimization=space -o version=2 ../no-link-kw.img ../no-link-kw.makefs-manifest Attached is a small fix that ensure makefs will complain about the missing link keyword when facing a link type node.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d26c1a0f8bceb6748436fe3fc57bac3ef8179dd3 commit d26c1a0f8bceb6748436fe3fc57bac3ef8179dd3 Author: Stéphane Rochoy <stephane.rochoy@stormshield.eu> AuthorDate: 2023-09-21 07:14:20 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-09-21 16:49:11 +0000 makefs: Handle missing link keyword in mtree spec PR: 241178 Reviewed by: emaste MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/850 usr.sbin/makefs/mtree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=be31bd59895e57fb7359de870ea3ecc19e3d1ae1 commit be31bd59895e57fb7359de870ea3ecc19e3d1ae1 Author: Stéphane Rochoy <stephane.rochoy@stormshield.eu> AuthorDate: 2023-09-21 07:14:20 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-09-24 13:17:43 +0000 makefs: Handle missing link keyword in mtree spec PR: 241178 Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/850 (cherry picked from commit d26c1a0f8bceb6748436fe3fc57bac3ef8179dd3) usr.sbin/makefs/mtree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
^Triage: set flag for possible mfc-stable13.
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d8d0ecd9739d5201c6d56d1a898b95f7ce35bdf5 commit d8d0ecd9739d5201c6d56d1a898b95f7ce35bdf5 Author: Stéphane Rochoy <stephane.rochoy@stormshield.eu> AuthorDate: 2023-09-21 07:14:20 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-01-22 14:28:57 +0000 makefs: Handle missing link keyword in mtree spec PR: 241178 Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/850 (cherry picked from commit d26c1a0f8bceb6748436fe3fc57bac3ef8179dd3) (cherry picked from commit be31bd59895e57fb7359de870ea3ecc19e3d1ae1) usr.sbin/makefs/mtree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)