From nobody Sat Oct 15 16:12:28 2022 X-Original-To: dev-commits-src-branches@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 4MqSvd1Bglz4f9jm; Sat, 15 Oct 2022 16:12:29 +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 4MqSvd0mWdz3sr7; Sat, 15 Oct 2022 16:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665850349; 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=N8eFWHw7cTJPslRtcmte/FLzyc0z0f1I271azxOpQyw=; b=BMFJ74R2yT3DIR+LRWz4QweWYvyUMGELfDfs2+uHaCmPmOpa/thA6z9DzjksLOWKcmpA8W Tfx7Q4yRyrk1dwJm0uSvPcec9VHSO8+MSEpsige6SmnV4A1WNpPGLsJJMLK1lEeE5xbzU6 QI03JQDgFtB+YGsZ40PDKPkFkDX0BLopvrr6nbSQ1Tp2iU5GErgk1LCSfTJbxaZ6ZJxcPS U6N3xXVuDUiixU7qrUerJ2BRndYhQxM+JZqm8GsVARI+Azpg+TRhbI4kFdbd4F5tw3KbuJ HwpWIQqK8phbFtfCYY/OdnIXM3tLCEcq1KMtTFh3Ron0kWPaYAbw/Cvg3cgPRg== 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 4MqSvc6xZFz19MK; Sat, 15 Oct 2022 16:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29FGCS8E054169; Sat, 15 Oct 2022 16:12:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29FGCSL0054168; Sat, 15 Oct 2022 16:12:28 GMT (envelope-from git) Date: Sat, 15 Oct 2022 16:12:28 GMT Message-Id: <202210151612.29FGCSL0054168@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Simon J. Gerraty" Subject: git: c3e9317fde85 - stable/12 - ldd: ignore unverified files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c3e9317fde85e273f1ca2c5060570f3bd90caca3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665850349; 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=N8eFWHw7cTJPslRtcmte/FLzyc0z0f1I271azxOpQyw=; b=PS7iKZ6+8LXfF9Rtw2v3vP982seP4AOk64mVIlvQU2Xn/ZQ/gV3+S7u5KCND32ALkclRCG S+PlxnD8b13iAB9y8/4uaCJofVxLKmJK2ZT8It7BCNerWbROyfuHPYwVBE1AOxTom75Y9e NfeuTBuKeX5yDCYNUL1EZxdj2spXHScvRRn/680EPJ51EYqx8Hpvy69T6B8EvOvds82r4A Zz+6SXRDgf/A0x+icQZOPIK44AUycWDzYCIq+G0zwbArxhtOXyL8XMJYhTDG3u5zsb20oR 5Bj+RKq9ElOOnbkrLg+bG39fFZ0HBUg6U23aq7Jpvx/YHyo+wevCOzsgHhLDoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665850349; a=rsa-sha256; cv=none; b=NI9zvpmTtjoLarO6QBsgNPZT+nmxe1R71nnDCAqAQEWY3cCRQpbORECAvLLdntOZfF4WyW hSabZPRTms1YBsBrE+kkbPFHaltAzIh1HHg8G9OZnOHWyqit3PkphTpyEx7QQ/Q1Lmar5X 2dBk24Qn6TwSQnUbDixdJlY1TCQL3+/rt9N8+XMJG8we3DUrHnQsqTzzYBrsWRFkIdQ/m4 d/kIXCVWA51piwLprwlYyR45rgPBeow64vuLe5yZDEgTB3uH218GodLozg9i2whIWtklKl 0p4Bcw7t4FdfryMWfQe6ArlcwLzdc0QYFF9BcRnP9GzlzlAxafl6gY6YLJ2cCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c3e9317fde85e273f1ca2c5060570f3bd90caca3 commit c3e9317fde85e273f1ca2c5060570f3bd90caca3 Author: Simon J. Gerraty AuthorDate: 2022-10-07 00:51:28 +0000 Commit: Simon J. Gerraty CommitDate: 2022-10-15 16:11:59 +0000 ldd: ignore unverified files When mac_veriexec is enforcing, we won't run unverified binaries, don't let ldd examine them either. Reviewed by: stevek emaste MFC after: 1 week Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D36897 (cherry picked from commit f48114b653a2a3d8f817ad68186235595ce304ed) --- usr.bin/ldd/ldd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index 5631b03b7bc9..d237850be765 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -190,7 +190,7 @@ main(int argc, char *argv[]) for (; argc > 0; argc--, argv++) { int fd, status, is_shlib, rv, type; - if ((fd = open(*argv, O_RDONLY, 0)) < 0) { + if ((fd = open(*argv, O_RDONLY | O_VERIFY, 0)) < 0) { warn("%s", *argv); rval |= 1; continue;