Date: Mon, 22 Jan 2024 14:29:09 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d8d0ecd9739d - stable/13 - makefs: Handle missing link keyword in mtree spec Message-ID: <202401221429.40MET9eJ001230@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste: 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(-) diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 688ce81e733d..1fe2eb4097b2 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -740,7 +740,10 @@ read_mtree_keywords(FILE *fp, fsnode *node) type = S_IFREG; } else if (node->type != 0) { type = node->type; - if (type == S_IFREG) { + if (type == S_IFLNK && node->symlink == NULL) { + mtree_error("%s: link type requires link keyword", node->name); + return (0); + } else if (type == S_IFREG) { /* the named path is the default contents */ node->contents = mtree_file_path(node); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401221429.40MET9eJ001230>