From nobody Fri Feb 14 17:50:30 2025 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 4Yvfj30lVlz5nQlX; Fri, 14 Feb 2025 17:50:31 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yvfj23SNHz3KC6; Fri, 14 Feb 2025 17:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739555430; 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=M/bad4YvyePSubFx8UlG+5S8DFzRwBElzcQKhGRn/dE=; b=XD1hF7WIxOCs0hhw2cQIiHnrTVVPyvC5qyXFbi9rd2ONRmvcEmVy4llzgJ/0RRJa69vZQ1 fDLhUhNYgVa64+ffANaEM+wBZN28JqqE+fF+FRqRJVpU5ve50NtWy6gf+bTq/m9c9Pnf3N 1GtIyDpbRL24lQZ41nhMmsh0BUVXdX3Lhqimo/mSEhC+7hEPAm5HqQCd0ULO+mQs6YtlS8 QdvDnPiULQ+8flsL89uVcSqKn4GIGVcFvJFX8sZ2oe9J6ij10S8N7dKzS+golpKJwhlek4 BfvoMLbvVmsJoLHp8WnWmnqqNIVcLwKvWvBSGN9KzqgwOzQqEyTKcdECbcasgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739555430; 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=M/bad4YvyePSubFx8UlG+5S8DFzRwBElzcQKhGRn/dE=; b=hUSURt6B/lq0TfSPBDqRtPLIU4EDe26nDZIaGkCIixA66bbGHFK2dnZMoIS1UehjWlF7uh XLn4y80iplpCa1Zzu5LBdKYHegUtK4yNmyCYw3qRsJu+08yJiS+R5iCxk4VpFLWZoO1fHV roWhLvyEGtORN0gHKedbdxXEyBLaVJX3F4Nzhk2UNCrUZwzojaSKLcPxP9+Q8D011KYMja kOxK9S8tNiVb4G3FMjbfYtRTl6rsF/OZ1rDiAe+Sy+82KLsIqDdQIglFctd8UgnRwbV8Qp MePQ4q2Lll26oH+/X/HskxLfBiYPfej6v0uq8JhiwF/yTqhPfswuw+crMRXm6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739555430; a=rsa-sha256; cv=none; b=a81ge4yltp8jjG9vuDCLjtZmdfbEjxub/4EtqDIpYSC6yw6nK/Yex76dQcJNB41U5BWMjQ Oi9LcAHoPJ1YP+ujYDp1NGFqNYsewJcxDOd4fd8Bm+biQqWopbigpZk76L7i3ypc4tcCDY pHj+8CZGkqLDdeHJKTudVh3jExUCs2RZXeRdFxbbP+OteFzqcIaTRnnwG/ZI0f32LRWno1 1hVdYt+oxajmSVps1XEJoesM8hXVozv0F7F01U7kB75kANsy5YDNiIy4b4E5tI6Ae+scjH uoEei3uZSm6J1uEAP5xVveDeAmcbh7xtuJ7xtVQ5gwAun9tJ4uBUK9jkkmRGiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Yvfj2321YzgfC; Fri, 14 Feb 2025 17:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51EHoUW9061520; Fri, 14 Feb 2025 17:50:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51EHoUdx061517; Fri, 14 Feb 2025 17:50:30 GMT (envelope-from git) Date: Fri, 14 Feb 2025 17:50:30 GMT Message-Id: <202502141750.51EHoUdx061517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: cba525e53bf5 - main - pfctl: relax the cfg file secrecy check slightly to allow group readability 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cba525e53bf5bfc95c5a66ad4fae1d16f8135e08 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cba525e53bf5bfc95c5a66ad4fae1d16f8135e08 commit cba525e53bf5bfc95c5a66ad4fae1d16f8135e08 Author: Kristof Provost AuthorDate: 2025-02-11 10:14:14 +0000 Commit: Kristof Provost CommitDate: 2025-02-14 17:47:53 +0000 pfctl: relax the cfg file secrecy check slightly to allow group readability default permissions and mtree NOT changed. prodded by benno, ok phessler benno jmatthew theo pelikan florian Obtained from: OpenBSD, henning , 7140c133f0 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index b370cbc463ae..522d2a910de7 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -6917,8 +6917,8 @@ check_file_secrecy(int fd, const char *fname) warnx("%s: owner not root or current user", fname); return (-1); } - if (st.st_mode & (S_IRWXG | S_IRWXO)) { - warnx("%s: group/world readable/writeable", fname); + if (st.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO)) { + warnx("%s: group writable or world read/writable", fname); return (-1); } return (0);