From nobody Fri Nov 15 10:48:50 2024 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 4XqYfW21Pkz5cykY; Fri, 15 Nov 2024 10:48:51 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqYfW1D11z4Wbd; Fri, 15 Nov 2024 10:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667731; 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=v46nF8vHp5sycttzce9ceSmumD8xuhSp3QbJxes4mVU=; b=qkeNtbjqNQ2cKfikr6FeONXSgVWk4V4jbpnvq7SplyrnfoB6B7Ox4ByKk+os3y0krtZ9hl 3wp3rhCLgwlRtRKB/E1M1Z9JVUBqbXLbPp2WJYsEL0vNcShlYZ8JWrw35NBedoEiDPMP1N UTgKI7DplTw1TS/Zh8f7JWVeFg4M/nciEZkEAcR22ya1KkB0PSWVf6KyCp+9p2t1mTtA1A MQzUnwHvl+jIpPBVt90OB+neW19LmZEQTUJyaIVUziIVQC7Z51zqIu7RXSRppFq/qiaJam R+/w8n9b+S4VR00zP4KxJcEtUdTvn9U6gSkFeqV3rjmX8J7PLtZPzhGLr4czDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731667731; 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=v46nF8vHp5sycttzce9ceSmumD8xuhSp3QbJxes4mVU=; b=pcHUpbRey/FUgVXjfNo2pmPWhajCome7AlGU+BQz+9UvXVMBna5Jwb2NUdrv1r2wbANwbq 4kDVSvzMN01JBobweV+Wzir6Gr8498YZzbyGGz6c9CmHW0e2dxuYtZxa5qc8VnGl/un1TA 2MHBNeZukVJonxef+Z6EbrlK6quuigUujhea4MpXq6a1E+NA66jhZ+9/sSGOSpvnsh6CtG 7/XXmOqacg4Fwg0z2jW/7/9JFOFDdzeohq9xNdSPxoUBbPhmJHfw3/ZumIh7H3xY04h6pi ond+HV8o2QHb1IrvDeOJK94ZRb0AT9fPt+aq6nV0P9twZMtQu/8cTzQyuuLzZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731667731; a=rsa-sha256; cv=none; b=wm6fxQBT3WCeHqErzrMKkqaMgFVPaV1JVKhBANmE8GjfEn5xCTTAXppu2JbIlDdnuiJQMe 2mEd+7YTKQCSv55Evk89XeYchwQaVF0e1UweUXiGQ2fczU3wXttAFhcjz5oVwUVAQPXwAw Il1m0/ZwYOUQocKA1C3JLYbjerGkh+3TOIVH+q4mVBx6wLcV5ZvbKNXdEvh3+4rGpD1+g1 FPzkfT+tJ+vzX6TsHfa0e4hmuoKE/O7cHxkiwJHhoBPic694zKEMbwpvQ5U3KoXL9gtRsi XUl1Fc9UuFKX9aWD8vpZLcATUidQVukG/eaQL48qwvZBggGWdEPi8Or29Vu0/w== 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 4XqYfW0jr9zKSc; Fri, 15 Nov 2024 10:48:51 +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 4AFAmpN7017635; Fri, 15 Nov 2024 10:48:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAmomp017632; Fri, 15 Nov 2024 10:48:50 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:48:50 GMT Message-Id: <202411151048.4AFAmomp017632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 3db3a7617b82 - stable/14 - cred: supplementary_group_member() => group_is_supplementary() 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3db3a7617b82c341c6beaec70123e2b8644c3e1a Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3db3a7617b82c341c6beaec70123e2b8644c3e1a commit 3db3a7617b82c341c6beaec70123e2b8644c3e1a Author: Olivier Certner AuthorDate: 2024-07-16 20:55:53 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 10:47:35 +0000 cred: supplementary_group_member() => group_is_supplementary() The new name seems more immediately descriptive. While here, constify its signature ('struct ucred' isn't modified). While here, replace "supplemental" => "supplementary" in some comments. No functional change (intended). Reviewed by: mhorne, emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46906 (cherry picked from commit 2e031fd0719b567e66198bc76c8a1c6c9b7f2920) Approved by: markj (mentor) --- sys/kern/kern_prot.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index d7de7deb2c0c..19279742ea81 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1280,13 +1280,13 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) * Returns whether gid designates a supplementary group in cred. */ static bool -supplementary_group_member(gid_t gid, struct ucred *cred) +group_is_supplementary(const gid_t gid, const struct ucred *const cred) { int l, h, m; /* - * Perform a binary search of the supplemental groups. This is possible - * because we sort the groups in crsetgroups(). + * Perform a binary search of the supplementary groups. This is + * possible because we sort the groups in crsetgroups(). */ l = 1; h = cred->cr_ngroups; @@ -1320,7 +1320,7 @@ groupmember(gid_t gid, struct ucred *cred) if (gid == cred->cr_groups[0]) return (true); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -1333,7 +1333,7 @@ realgroupmember(gid_t gid, struct ucred *cred) if (gid == cred->cr_rgid) return (true); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -2327,7 +2327,7 @@ crextend(struct ucred *cr, int n) /* * Copy groups in to a credential, preserving any necessary invariants. - * Currently this includes the sorting of all supplemental gids. + * Currently this includes the sorting of all supplementary gids. * crextend() must have been called before hand to ensure sufficient * space is available. */