From nobody Fri Oct 07 00:52:05 2022 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 4Mk8sL1wKjz4dvVx; Fri, 7 Oct 2022 00:52:06 +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 4Mk8sL1TP3z45MC; Fri, 7 Oct 2022 00:52:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665103926; 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=R8rU9BsqsyRH1jqcRIa/Kan/Zrow+7Z3bLMDEoUCiCk=; b=irbShSNdJiDUjZa0+QcZpa9yunWku6xfdPJ/oOGlPDz1lGO8QqOkX2XqzPW8xOz6wwYT9V 0Xm7j22pWqXAdPsYZ7lcW0AUyQKwfQLFbH6kR85RCvHEfCHzAfbe8cbSMf1lg2Fm6Kekbf lCRCgEVoXdO1DC9qEnjIkkU6Rj7HjDyJrRB5djCAnaw1wYDp9OY+iYOUAejUBeBD7BNp2M qW+Ro4JXX2QKwxXv2yPyTR7QdN8tBzaApbUPfP2+4qOckE/Vz5nHcXnWbZ/tFrdXyAYT1G DT75KScVxs/JG21BUrSZcq8ErIgTjrWHL8Ova5mTtF4R5zoQpH0ooOrmbqdvZw== 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 4Mk8sL0Xl2zQYp; Fri, 7 Oct 2022 00:52:06 +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 2970q5qM065306; Fri, 7 Oct 2022 00:52:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2970q5de065305; Fri, 7 Oct 2022 00:52:05 GMT (envelope-from git) Date: Fri, 7 Oct 2022 00:52:05 GMT Message-Id: <202210070052.2970q5de065305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: f48114b653a2 - main - ldd: ignore unverified files 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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f48114b653a2a3d8f817ad68186235595ce304ed Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665103926; 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=R8rU9BsqsyRH1jqcRIa/Kan/Zrow+7Z3bLMDEoUCiCk=; b=lSS9TUKoDMRFKd75su1/f5kovPvfCdQOjMwRX8EqhDEJQircSjnFolyi45xK47EsMvpewz pNYaZTy2uoA2+twzvL6gTdq/oAklVELou8STva8RGOXEUmCk81sMTYf7qPYBmLvkSrPxRA hgsXWyh8Qi2t2P7gUV42SIeuE8yTpVG+vfUV4ymgmw/p4wVe8TMNaH1697TGr2SehWULff jlsrS+xQL/ey+qXa+aCp2fIAcp9Yac+PRVLmP7eVnPsO8pqxReez2Hdx5ma1cM3MGnqSpj 3fg5BKo8mu/Ab5Y9uwvfcrZjLrQJ/PMaodTEapqEWGqZiqmc1ij5CH5PV5gOOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665103926; a=rsa-sha256; cv=none; b=Yhn6sHo0cokFP/GQnOO25TuPrCC736uBlNSDkvXR0XJYirMOQVU42kKpXrWhnr/qzWPuqj 4Ek9Bk7zdia6Y+s8CL+jxLhmHa99p6KpozGk8rapKRdDIJH8py6+/+WHAMwOpkNX27HRco 0swqYD2mp6coDS1auosrQob1cHF95/sYUfOMYbZ/5oOV4yGbY2RA3c4lKUOnEEWrPtWHMd mYE5jv0fWTuhtOUrmnukXsVgAh9eIKcA8dG6MII72EuE1GYsgdX5Y9+A6Y9xZwomrdO+5U RBlZwZE4oM5Q2NSOSv6PSbbRvAnFN//RGxn6R2a/O7hRaWkxU1ne+ij2GwA58A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f48114b653a2a3d8f817ad68186235595ce304ed commit f48114b653a2a3d8f817ad68186235595ce304ed Author: Simon J. Gerraty AuthorDate: 2022-10-07 00:51:28 +0000 Commit: Simon J. Gerraty CommitDate: 2022-10-07 00:51:28 +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 --- 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 8897c8cbfbc2..2cd2a4c72324 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -169,7 +169,7 @@ main(int argc, char *argv[]) rval = 0; for (; argc > 0; argc--, argv++) { - if ((fd = open(*argv, O_RDONLY, 0)) < 0) { + if ((fd = open(*argv, O_RDONLY | O_VERIFY, 0)) < 0) { warn("%s", *argv); rval |= 1; continue;