From nobody Thu Jan 16 18:08:18 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 4YYrSz2KbNz5kkZr; Thu, 16 Jan 2025 18:08:19 +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 4YYrSy4fsHz3RV7; Thu, 16 Jan 2025 18:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050898; 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=1ZkTddVo7sQHYYdPAzIGYMkiy0PnWg5i4+K+8W0lSC4=; b=QCajwdgeoY+ROrJnUieUcLWWOuZ1kKl/sbaRo4aSFMnGdb3h/YE1AS6ZbUGBsUDsXZl/SQ AP4zg6P08sTJ6CrGqXfaAwOEKdASwx3kDxEsIO/IxNLnaBbup4LkhvZMA+uLfDWEJaFmxa f8JAoKCfnNbU1/HufpBey7gYaAsIsy7SoRt3/Mdz2exE8dgCWkw0fa8R4mHqS+Q6UxcK/l 7QUApnVzbawwRGjk52k7TvvdAbYw3L/9L93c4X+au6VV4dfVLSBctdwjynRDWgqm42BZ65 wMzi0W1Nm5LZ+0jB/TFv5gMgvU9o+Xf8GD0Czx4Ob3ueqmImmjjHu7Cz1q72uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050898; 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=1ZkTddVo7sQHYYdPAzIGYMkiy0PnWg5i4+K+8W0lSC4=; b=kKlbLu9sF8BwD0k2J6+NS/l8mGDt3Zf7ohRI1/RPtGk7iPFc59QY6Ym0vEQTtAN4vsEu+Y +0+BRyxnyAj1H0guBrURRY6Rj8D2ZFLZrXNiVE1au3CaSfGFElPaI8+ajK7bfzZSMMi63N VvFlWryh4ii+WwBy1c/meeORdB6Zw70d105BdmOc6hewrF4+FzAuh6X7QXzmd46GaqWQ0B WjqF3/R3GJPANBk9JKUctB9a+PjQ/mWfgvCXH+uj9FfH1lDOH83U2HL6JgmeeT4Qo/nnXu jPG1DBT4NjLSZrBN5tS0YZcw3T/WQ0SBF5XFmL2knnfCfeqqhBpWzR9rnzWHnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737050898; a=rsa-sha256; cv=none; b=mYmik3OavZ6JpXTKgpndrBMkiJrW8gHsrR9modeCeFzQfrgonDxUL3JkM9hDKoUxdyLTvT zI8s9ebhIRGC0P35L8ExC4FemcxeerySHXKSPr0/qVm9CEWoqSJbLKdML7pSBUh+9eSsBE WR8DcShhNjz0qFK2j6aaPm3mWJ0pIkq9XY6XwEth9N3M0/QyUnuj5RSYqO25kxzx/25Ar/ NP0wL7Irzp4dDq38KRRQN9HC7m8ygRcOXGV39BuwQMwaixX0ZtW5nh2V4dma7bHXqKuhmJ bDEwlVpf2/j8KpQj3H/51GP+RWijwq3FnisJCmYlTZwvixSUFzKQm5Uybic/gg== 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 4YYrSy4F1gzk12; Thu, 16 Jan 2025 18:08:18 +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 50GI8IOt091948; Thu, 16 Jan 2025 18:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50GI8Ign091945; Thu, 16 Jan 2025 18:08:18 GMT (envelope-from git) Date: Thu, 16 Jan 2025 18:08:18 GMT Message-Id: <202501161808.50GI8Ign091945@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: 6a654950dd5f - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 6a654950dd5ff32efdaeb0f3e622a2f04212c51b Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6a654950dd5ff32efdaeb0f3e622a2f04212c51b commit 6a654950dd5ff32efdaeb0f3e622a2f04212c51b Author: Olivier Certner AuthorDate: 2024-07-16 20:32:19 +0000 Commit: Olivier Certner CommitDate: 2025-01-16 18:06:56 +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 44a1f26767ed..3510dc16f731 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2119,8 +2119,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); }