From nobody Sun Sep 24 13:19:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rtmnk3r4cz4tyHn; Sun, 24 Sep 2023 13:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rtmnk3LnPz4WGj; Sun, 24 Sep 2023 13:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4O+7J/WpIHswDgkDeBF1qczhxypPtMhrC0ITIAau8F8=; b=W8+jyHintSak5SETVGPDnqoZaxNoES58R5xU3BjiRhovRYQLTXTtN6fM7p+3W3NxLLNifF YT2jEK9XyaZUPiwYJsPpwX1VoESh/A/ypyrkosxipPHYPm1I0xX0sR8povNYVrq0jGqwRi PSNNQfl8KIv9acjp0vws/zK9/9MsZvXYRW80DESmA0448lro0Bz8+Nfd75cHf4vNVnDmnj k8TUUZsdl1i1UnXvNid4O1rnSFPMgwmIp6D8otZoTqsQ8Upok9a+7ELjgrimZXY9AJthSe hOIAu16OWPKt+bTS2gqi90us/wrZOB9nefrMCPHEgm8j8lVSCUSSJWN8kh+LxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561594; a=rsa-sha256; cv=none; b=CcCU51zxlA0DzncH7IrQRzSyIzXglpjApgwd7IoMRTj1bemOyNRQjAyCkddtkwHKYgEG35 DRtVahMpxt0V6HNsIzCoAnmYgjxs2klL25xNDG1zyfyFCIXl76737NV1UK6vvNi+6qLy8e 5BYt/X0d2/JcldQnMF1WQIwRbKY7vRBo7GQQiT1oJaimyCRqEtFGgWeBWbr3WoJ+QZ3oNh 85b9ZNg6k5crVZ+cUutLXyFPeT3CkYH3ArSuEY3iEak51UBfDLHv+I4i/ifq/+i3BzU6m2 1fLw5Fe+lnmYNmAuYswcS/hn6GPzqZ4Vc8YxyWNp1cm7J8lLj38rLRlAi1YZKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4O+7J/WpIHswDgkDeBF1qczhxypPtMhrC0ITIAau8F8=; b=EhnwOTVgucXuQSJY87R9KNgGXcIu2w9/x7KXKtjJxrl4L9NiKSPTYCYgFIKp2rTNMcHA2Y O6KhyNL3R+DwyEouQ8/6gSH2QExEYAIJXoUljOnbRBne+FG2J29zwRQGxniJqiQHYCHUsC hHcm8jBuI46XKlXypSx/969r1fq6tdpLJOcjSDH9FQftIQl1XrIqUjSISxHWuESB6VtA4H B57SDt1JDlCiYPV76t694O2gulvlfP6QJJWx2JSc3CxIiPCNrqnyaCCeIurnOdXX8wReN4 9VrfPNJI5ARIEyallGXVWSN/oXydXBGG+VRrsNvnkGrAsqQwdtcBkAj23/Obww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmnk2Q3mznQ0; Sun, 24 Sep 2023 13:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODJsLY079646; Sun, 24 Sep 2023 13:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODJsml079643; Sun, 24 Sep 2023 13:19:54 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:19:54 GMT Message-Id: <202309241319.38ODJsml079643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: be31bd59895e - stable/14 - makefs: Handle missing link keyword in mtree spec List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: be31bd59895e57fb7359de870ea3ecc19e3d1ae1 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=be31bd59895e57fb7359de870ea3ecc19e3d1ae1 commit be31bd59895e57fb7359de870ea3ecc19e3d1ae1 Author: Stéphane Rochoy AuthorDate: 2023-09-21 07:14:20 +0000 Commit: Ed Maste 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(-) diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 45588e202542..3e62afbc1137 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); }