From nobody Thu Oct 16 18:50:18 2025 X-Original-To: dev-commits-src-branches@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 4cncTQ4vv5z6Cxt6; Thu, 16 Oct 2025 18:50:18 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cncTQ4J4wz3G2t; Thu, 16 Oct 2025 18:50:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640618; 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=ERv9SZhtUQ0kBQMeneup6pRCATfudM0A2yylgbShrRs=; b=DmYiHqYvrgmZIqRJ8EO73L42jq7Vlescytk9UpfgcsBFGSGv9e8h7idiVe6896P6/2g9GI BakL0BuLhpqmVuA+OCbBTMQnsj48Fk1WlRM3SSunkNgBNLlCvGtb06uDayj0+PuuLqr8Hs ANS37lc3L33Al6zjlBIYmmzinojlGZz7cMTEtcDJPFXY1b6TNM1F36uDKyiWCqH+y7dBFf 9BIWEP03nEiU6gUQcOhq4y0CMfaKA0CE73E2ztxdmzMH6Bz6JggyMuVQsXxgbbZa1VvZEQ eoO/69vZ4gCBGCE2B9/RUXJ5+n3bEHaG2H524M/6H3MBEWcvpfsR3Q6LsMR9bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760640618; 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=ERv9SZhtUQ0kBQMeneup6pRCATfudM0A2yylgbShrRs=; b=A157hP4UDj/B6HnX95vpNzvwDOCGEdLF+2VsZYrp1J+P1I0aCDXfhQc75dOs6R5Xgq2Rpj KJdxlEi+lOyyeM/9szYmQor8NyzXO/xpkNJoGFSv5kiDovzwQqbeeRG4h1wERK9ZhKXPFv yX4dQVO8TW5OlhvYjca6Sui7FlChhK6Bm07iY7kvy5w+rB3CIUjMQGxYe/j/S3qPwJpoiP E2aQhhjOGWE/mk381jBQMAGsIzgeQdBKHf+zkaLNk142EnaJGJhoOvQ6FIJ8DsyXGCR+eI 1dIFDLGU+sOI4iuEBI80G7x/0dVGZRZU7DaK6IaveuflOldq7Tth2th0Mo0CUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760640618; a=rsa-sha256; cv=none; b=yTzM/DvQDEHtS17Tbj85f5XcSNDI0T5CfeYpifyLtv/ykoKAP70RutJ/OAg745A7Grxf9D e6q7xhu752NGYrZgK94CzvERZCfCPc7ZeF5ZeW7fGkW7pDvkDZqcafUUofQmAX8YDpSTFD 3KaAsyFLIEZ9rPq0mIXMZnHI4+p8Pu/8HiPpKdn0Y+SFobgEo8nw+QYUPvSnbPC90yc8/m 9Y0KOYEe2dS5CtHz2ao4wQ3LpZSZBoXnvFdUDivDOcqnOJ81ItjbzNI/2QgL2vlaFNYCYu u3UyAX+XcMfAzouhgQe4Gxqv6RB6TGT9mD5FzT+HLTADF6PemymmYV4RNk8h3Q== 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 4cncTQ3rDtz5V5; Thu, 16 Oct 2025 18:50: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 59GIoIfv075063; Thu, 16 Oct 2025 18:50:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GIoITW075060; Thu, 16 Oct 2025 18:50:18 GMT (envelope-from git) Date: Thu, 16 Oct 2025 18:50:18 GMT Message-Id: <202510161850.59GIoITW075060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 330b91854917 - releng/15.0 - sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 330b91854917ce416700ecb8a2a1d781f9abe45f Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=330b91854917ce416700ecb8a2a1d781f9abe45f commit 330b91854917ce416700ecb8a2a1d781f9abe45f Author: Olivier Certner AuthorDate: 2025-10-07 10:03:07 +0000 Commit: Colin Percival CommitDate: 2025-10-16 18:47:57 +0000 sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity Approved by: re (cperciva) MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit bda3b61512b2597d4c77d2b9c9074b844dec0405) (cherry picked from commit 5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2) --- sys/rpc/authunix_prot.c | 16 ++++++++-------- sys/rpc/svc_auth_unix.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index b107d5541c50..f63a6d3f9dc6 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -60,7 +60,7 @@ bool_t xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) { uint32_t namelen; - uint32_t ngroups, i; + uint32_t supp_ngroups, i; uint32_t junk; char hostbuf[MAXHOSTNAMELEN]; @@ -102,14 +102,14 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) * historical layout of preserving the egid in cr_ngroups and * cr_groups[0] == egid. */ - ngroups = cred->cr_ngroups - 1; - if (ngroups > NGRPS) - ngroups = NGRPS; + supp_ngroups = cred->cr_ngroups - 1; + if (supp_ngroups > NGRPS) + supp_ngroups = NGRPS; } - if (!xdr_uint32_t(xdrs, &ngroups)) + if (!xdr_uint32_t(xdrs, &supp_ngroups)) return (FALSE); - for (i = 0; i < ngroups; i++) { + for (i = 0; i < supp_ngroups; i++) { if (i < ngroups_max) { if (!xdr_uint32_t(xdrs, &cred->cr_groups[i + 1])) return (FALSE); @@ -120,10 +120,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) } if (xdrs->x_op == XDR_DECODE) { - if (ngroups > ngroups_max) + if (supp_ngroups > ngroups_max) cred->cr_ngroups = ngroups_max + 1; else - cred->cr_ngroups = ngroups + 1; + cred->cr_ngroups = supp_ngroups + 1; } return (TRUE); diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index 963f4f272964..aad4e7610795 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -65,7 +65,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) uint32_t time; struct xucred *xcr; u_int auth_len; - size_t str_len, gid_len; + size_t str_len, supp_ngroups; u_int i; xcr = rqst->rq_clntcred; @@ -84,12 +84,12 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) buf += str_len / sizeof (int32_t); xcr->cr_uid = IXDR_GET_UINT32(buf); xcr->cr_gid = IXDR_GET_UINT32(buf); - gid_len = (size_t)IXDR_GET_UINT32(buf); - if (gid_len > NGRPS) { + supp_ngroups = (size_t)IXDR_GET_UINT32(buf); + if (supp_ngroups > NGRPS) { stat = AUTH_BADCRED; goto done; } - for (i = 0; i < gid_len; i++) { + for (i = 0; i < supp_ngroups; i++) { /* * Note that this is a `struct xucred`, which maintains * its historical layout of preserving the egid in @@ -100,18 +100,18 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) else buf++; } - if (gid_len + 1 > XU_NGROUPS) + if (supp_ngroups + 1 > XU_NGROUPS) xcr->cr_ngroups = XU_NGROUPS; else - xcr->cr_ngroups = gid_len + 1; + xcr->cr_ngroups = supp_ngroups + 1; /* * five is the smallest unix credentials structure - * timestamp, hostname len (0), uid, gid, and gids len (0). */ - if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len > auth_len) { + if ((5 + supp_ngroups) * BYTES_PER_XDR_UNIT + str_len > auth_len) { (void) printf("bad auth_len gid %ld str %ld auth %u\n", - (long)gid_len, (long)str_len, auth_len); + (long)supp_ngroups, (long)str_len, auth_len); stat = AUTH_BADCRED; goto done; }