From nobody Fri Jan 17 12:27:08 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 4YZJrr2gCNz5kvqx; Fri, 17 Jan 2025 12:27:08 +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 4YZJrr1qY8z3Tgx; Fri, 17 Jan 2025 12:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116828; 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=uqBpZSA1rr5FZYP96LjNL8tN+nKXVKVjFi+pXCmapWA=; b=PABaQQAkswNQQOf7l2URNCRmfAqG1zXOVK8dSNfPJ02D799Mp1UgDvpZUyZbti5Ex6eCqh pIpMfBkYwvj0MYd/Q93UVv1r94fX5zEzQrKnlEb+nxeAuvMd/tcSg8zeBlIRT9GjK0zVBI +0rLMvYSUAh/Eh+mdsTwwreOmc8JO3it1pu1akjXBvMwFz16I+PhSCtspSa9UB46d2vgKH wGHT8ESLJk9Q56RsdvB5eZI4xumwJPQn/LclrwE43RVnvpcm17TxqMCwMnIAQuKZNdUcQz +9MQEzGlID0eOmufi4+ByL6uVRwvJ/qTy4mZfLNxEqq6OayckTpjIzkwcEJRmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116828; 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=uqBpZSA1rr5FZYP96LjNL8tN+nKXVKVjFi+pXCmapWA=; b=dI2TY/2bQmbIcHNg7QOR0lJx7Kpg/sE8QlsDcxCpm0zgrUcUZamSJbeh36VkJA0KSfHFOY 9NER5GR2GoTfwXRJUhuo5fh1Gh1mNPjNoJ7JZ2yJB/3M2NmQlwUrgXK5su2F22uBNht63q X1s2JZH9oASx3vb3td4r5ZUfPuozX0dGcQ0RVJAYmvP/aore96YD/ZmmqriK3vlP8CgWRk nhRY9qIpJQK59E0VQW1UIQF4TJ8Xl2OgLnSdGAVpHLAoXc4y0G5wiMGCVZG49xYFTNLdn7 yR4AkLo/HGBnCdfKJ8qVstdZKOq1RxvijoI7G3AzX8Qky7r5UI4aRdOi7NsJgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737116828; a=rsa-sha256; cv=none; b=NJ/9PJSvuP2cRLL1O0STlgc41b9A77jNqKWRNOB3iDnozcmDOiz1S0YI/6IpCU2PfVOPoM Vv6sGfOVR3wGUBSLMnWJsMa+ZAhYjFsyeV/F0uo1klmE4be4zIt2AVVETn54uj8ONfXHcV isnQPF2v15YWAY+NZP8ruQ4h6DK13VCEouV90okq+qD9o71Dw4ZivGc9Z1nHkYBCQBZCFD A2rFTElvJ8xZsdDqEwEzI2OBptrPg9easuvv3FTxe1l0UGFH8NoK6dmHoG5jN5Kng/USIX ASr3tbOuQ0mStr1Daw7y/gsGnVmGpHjdayPDblE8H0dlN79ykJhMNMHjSogGtw== 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 4YZJrr109pz33N; Fri, 17 Jan 2025 12:27:08 +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 50HCR8PC052237; Fri, 17 Jan 2025 12:27:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HCR8CJ052234; Fri, 17 Jan 2025 12:27:08 GMT (envelope-from git) Date: Fri, 17 Jan 2025 12:27:08 GMT Message-Id: <202501171227.50HCR8CJ052234@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: 5f7586197e84 - stable/13 - cred: crget(): Compute initial 'cr_agroups' with nitems() 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: 5f7586197e84caa22013bbdb7bef1f5c5ac6c4ca Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5f7586197e84caa22013bbdb7bef1f5c5ac6c4ca commit 5f7586197e84caa22013bbdb7bef1f5c5ac6c4ca Author: Olivier Certner AuthorDate: 2024-07-16 20:32:19 +0000 Commit: Olivier Certner CommitDate: 2025-01-17 12:24:51 +0000 cred: crget(): Compute initial 'cr_agroups' with nitems() No functional change (intended). Reviewed by: mhorne, emaste Approved by: markj (mentor) MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46910 (cherry picked from commit f5b46856918cc6cc3ea49e3ab95163d318563ece) --- sys/kern/kern_prot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 2dc5ecd00175..5fe587bdc421 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2117,8 +2117,7 @@ crget(void) mac_cred_init(cr); #endif cr->cr_groups = cr->cr_smallgroups; - cr->cr_agroups = - sizeof(cr->cr_smallgroups) / sizeof(cr->cr_smallgroups[0]); + cr->cr_agroups = nitems(cr->cr_smallgroups); return (cr); }