From nobody Fri Nov 15 13:00:42 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 4XqcZf3nKtz5d6cR; Fri, 15 Nov 2024 13:00:42 +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 4XqcZf381jz4pJc; Fri, 15 Nov 2024 13:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675642; 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=4DHMSHr3iGzph+UWxdlgXUP0fir669qhwb0oucsxlQs=; b=dH6LKif7Q7K414KixCzywDWinN7ypvrtX8bhczNUYzpKsy6Qx4rz0qrtnD+rxczWsg7pBd D9/E3BTTsYnFUgvrTYwxZZ1uo+43mzQOgluBmrjH1BUb3s+sQ8u6NIBZsQEFERifzy5+7l vk9aHSADEKADslfp6Xmv+35/hJYxw++EH8/bmaFpMrL2WdsHKgL5RwQgVq32u+WjkB5QcI yu999RNYfCjvXyF3l87pC5O7uiCOLH/7v8p7u9OlmIUUIJ18M7U49MhXTtCjHG6LfFJthl yXGfb7dLQjubYmlteZHzBxDFlyQJLpA9frIQkf+aQmbPkQfoAJphKa6kgrxl8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731675642; 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=4DHMSHr3iGzph+UWxdlgXUP0fir669qhwb0oucsxlQs=; b=tDWrY0EcklX4IX4CVlluY+eoU0gHtybdr2WX8pJX+YooGAoABTXsLbjSKU4GOctViZk/Pm kvqYypdjjxLZnq+Jr1nUBYdII9e4ookfVs2+24YpBSnU6wTWE1f55NV0s4gQt7IWbnzCoL JUBtth5gyMkMuLOaY/oxz3SMRpnj0Nqz57hxpZ2QqKkjmluJLdJnruU+f+bbHtG4jSxxeJ gVU5BrjNzsxgatT/Fc3BDZyQONKdDHP1veNGTh9+qFHiufQ0ai8/mm1h30PfVLipn6+MVs 35HhcOg8hLzF44XwBeWjmsBT6h1lZOXLredsl9buFzLjTIBq0F3+XeQrmF+mIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731675642; a=rsa-sha256; cv=none; b=yjEt+Sg6MwR3I/m5ZLlcpQsX8t1UtAISM36OTOuO7WFQcG6MJjL3Q03QTBuu01/qP1TTfD OqxrnTjyH28RHeYEkCZ34VTAVtFX8FpewIPiT8ak10ryfm3bKUcPRIJeSTY1VzmcYY6Dfb a0RlH/1XnBSV2xZQzOrxry1S3nxR1hvcXV8K9Z3y8xy4XPTPJCZnDq8rdjDGdCgaXz9mL1 tN//o09ZthPc6OSqdjLDZUOiHWVCEGBzsXZ15BUp5uBPI8aDngZgGyLd/24VMYcMUpJchK GxoFRI4LSHQb9uomZuxDdVFIF7FFrtxqroFTmSZD6v6k4GryQmCrtdL+NrCcLQ== 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 4XqcZf2cKGzN8r; Fri, 15 Nov 2024 13:00:42 +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 4AFD0g9M069737; Fri, 15 Nov 2024 13:00:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFD0gLE069734; Fri, 15 Nov 2024 13:00:42 GMT (envelope-from git) Date: Fri, 15 Nov 2024 13:00:42 GMT Message-Id: <202411151300.4AFD0gLE069734@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: 9d0d6174840a - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 9d0d6174840a124271a11f2cbd22f6664f9f7fcf Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9d0d6174840a124271a11f2cbd22f6664f9f7fcf commit 9d0d6174840a124271a11f2cbd22f6664f9f7fcf Author: Olivier Certner AuthorDate: 2024-07-16 20:55:53 +0000 Commit: Olivier Certner CommitDate: 2024-11-15 12:59:03 +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 abe989045fb8..c80db8efeee8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1276,13 +1276,13 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) * Returns whether gid designates a supplementary group in cred. */ static int -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; @@ -1316,7 +1316,7 @@ groupmember(gid_t gid, struct ucred *cred) if (cred->cr_groups[0] == gid) return (1); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -1329,7 +1329,7 @@ realgroupmember(gid_t gid, struct ucred *cred) if (gid == cred->cr_rgid) return (1); - return (supplementary_group_member(gid, cred)); + return (group_is_supplementary(gid, cred)); } /* @@ -2324,7 +2324,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. */