From nobody Wed Jun 3 15:33:17 2026 X-Original-To: dev-commits-src-main@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 4gVsCy0dzbz6g5cw for ; Wed, 03 Jun 2026 15:33:18 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gVsCx6NQQz3j2q for ; Wed, 03 Jun 2026 15:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780500797; 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=RULfgwhcDhG4hCxtGQxPTfV4Sf3OoRryUDZNbIMqSFU=; b=kPrIuUSGU3S6JYUivk2wyRwxwNnN61uJcvESP2NJcfXUmXsc3sQlZBVeBmfLlpbNRiDSen O3zs2wRbqyuSRNy0zlKipzD+7QIquL+oxjzQV2vxt5wcqDxNml4e1vgva2ZNKaLPMHUroU xo2UekSTmuS/A3LLiWRqQFsLgUCeOvNJoPCU1l6g51hNFJW0ooR1SfqFDyqh96fzwxRTNb 0aGux+VJi39prn9hC8kEMZkWcnU0rqlQzC/gr0x5aYyWKirbZP8bXu8u1knkKF1InUOYdO c8QaVv+IcPm7ac36ebm57CspAB+OtbjdP7hpzlqcHnVbVYqzj3Sz8Be2laaSTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780500797; a=rsa-sha256; cv=none; b=cLnBTkPKwHoBXMnQJT3c9CVsSqx369dVU44XOHQXv+gw/WQ1CIciXdA5m6axCPucClszXm 3AOc1jpwn0gAEURUD+Z3wJTFV6kVy8FSiAx6dV4m/N/wQeVxGTCvtnzo6aejrvDoTeGmJv 1DkGBbjXv5shb8B6avwWGEN2dqkycVdsABbRjc14nrYEDMYbBD1jgpCGitvgekYyKWtuY4 aGSHvSX6uDG4LeJjFplUKpHD08rknHBpPY/nFKEcCH95NYjyyoFRyeEk9sudwlcl7hAdg+ Uy4wqA4V4uVuhc8MkQnqlR6z9EA79grKJ5KZR5zV/8O8m7B0P3iXFlYshybwPw== 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=1780500797; 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=RULfgwhcDhG4hCxtGQxPTfV4Sf3OoRryUDZNbIMqSFU=; b=AeDEsmX3b4cLxE/GaXAX6DyvHky0tyNd9oO+gw9pGtc4fwRissUfk5eifJz1vRMUrD/q5v vFvDtUtq+mEF8TJb9QWxbdncOlU+7pb7IBcdTATfAAdACWrPdTCY7O3cf1F0mcsp2ak+ZZ Kv9Zk7CeG+HoKIBUqlJQc01tZ4XwvZUlsum5k8AfRx2sUm+jsE9aWSwO2Kiutdnbyfe3aE HuY7dm9N3v+DsBcF9cBOsNw/Vlnfq9S5i714w/kfidwpKaXwUosBA6mteKFjSVuIki3ttF QYjB+ECSwzs2INLrlZVNBRa6opXXcv5mT8lsXLx5KRzH7u8c5VDzraLSQzjh/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gVsCx5wyxz2ws for ; Wed, 03 Jun 2026 15:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 400a3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 03 Jun 2026 15:33:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 521afce6a859 - main - xinstall: Do not allow -l and -s together List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: 521afce6a859c1d7ac9674e8f21ff45418becaf5 Auto-Submitted: auto-generated Date: Wed, 03 Jun 2026 15:33:17 +0000 Message-Id: <6a20493d.400a3.39051d46@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=521afce6a859c1d7ac9674e8f21ff45418becaf5 commit 521afce6a859c1d7ac9674e8f21ff45418becaf5 Author: Ed Maste AuthorDate: 2026-06-03 01:27:54 +0000 Commit: Ed Maste CommitDate: 2026-06-03 15:33:05 +0000 xinstall: Do not allow -l and -s together Cannot strip the target if creating a link. Reviewed by: des Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57398 --- usr.bin/xinstall/tests/install_test.sh | 3 +++ usr.bin/xinstall/xinstall.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/usr.bin/xinstall/tests/install_test.sh b/usr.bin/xinstall/tests/install_test.sh index 6b091f26b377..377920200490 100755 --- a/usr.bin/xinstall/tests/install_test.sh +++ b/usr.bin/xinstall/tests/install_test.sh @@ -27,8 +27,11 @@ atf_test_case incompatible_opts incompatible_opts_body() { + printf 'test\n123\r456\r\n789\0z' >testf atf_check -s not-exit:0 -e match:"specified together" \ install -s -d dir1 + atf_check -s not-exit:0 -e match:"specified together" \ + install -s -l s testf copyf } atf_test_case copy_to_empty diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index d389bdbe3737..facdcb737c41 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -293,6 +293,12 @@ main(int argc, char *argv[]) usage(); } + /* Cannot strip if creating a link. */ + if (dostrip && dolink) { + warnx("-l and -s may not be specified together"); + usage(); + } + /* * Default permissions based on whether we're a directory or not, since * an +X may mean that we need to set the execute bit.