From nobody Thu Oct 16 16:58:19 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 4cnZ0C2mnVz6CnQr; Thu, 16 Oct 2025 16:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnZ0C25dwz3k2J; Thu, 16 Oct 2025 16:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633899; 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=rTrLvoAErp31NzliMloosw6m294NQxreRSGFC2zj2uA=; b=tEYK7hK1eEVB+Oxd82wJ+sAG1oaMO9vpqY+QOnrv2QPWSUQITb1imphiD+Q/fT0xlzHuun s8osHRi7q7hM6s2lzDY2bx4nIawMl0VWnx+sYS3ve4JxZwqQ2WiBp32+ryMtDv5aHLw0QA ffFVqCI+mBeQs7UAcQkHTnHVIn38GPRLfaUMQ9pCBZtNP6hCjRqXDNxsxp8B7M2AQNvqzu VpFJ4hRdfGlsQPGxaPkEiU3MCgtzbFTdVYAjYU/+IhqJQGhudvXBkxYEOERecgLSHsNFnG 4Ca8mlOTaLH4336IENiGuSpsAs062yVuhkIr/MygFGmIH52kfR3xb8qtMPct0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633899; 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=rTrLvoAErp31NzliMloosw6m294NQxreRSGFC2zj2uA=; b=PxuBJauQjAXIpF2CmRqaa+Rdghdiw26GEpBt4C5cAeoxhlNx6QfbZyYDErDVcNfJ4WhlrJ BRQWzcFGevH1Ia93qZMrK0rFlS0mvLA7OUf5jKkVrgDbuTI4gj51hvrycT9QqzvJIhAys8 hZJj8A3Rr+6oGp0xqBbJ87LMYRv2nApmLKL4RnPm9Bw9ELdJw8eTu1yZGvAg7pKRDu553Z jjBK4tHVIFjklpD8JAozAh3C7Q3YtYEMOFM5Gt0LD0PPpf1FfR+3aE8u9R3dbBojacG3Sr cf7d6d8RBF7lJgtSI46YmYi4gGhEDr1s3zfYNoAe/oSJWKFLK2fXmVXt6RpLsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633899; a=rsa-sha256; cv=none; b=Li7HxdCpLZ/ZzWbrWAm+LRT31iylNCo0Ciym+TLNYS5hsh2pHygSZiBhKO3TRCyitd9Vne A0RMv0y6B96sNHKjb0ey1nxJ57u/6YAog5RSrmcDu2TVD6ueubeak6F6KKOUjIua2XxNWk 8v6m5Mzydac33zmmHn863FOE3t8b5ZHT0d49w6mYhdnv41f1ChO8MlRbEjXExpIsChMf71 UK1bQGGHyOUoaB3z/ep5N5AsfsnjF7MsPdz7CDszfy4yTZHPg92EaSMxJDfEHIQk2pU4i/ JETtsnVg4O4w/4izkeE+moC7/LESdMOePiaOHSVmXkJ1QFqrK/7pT+d17DvkUg== 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 4cnZ0C1b1Hz2Gc; Thu, 16 Oct 2025 16:58:19 +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 59GGwJnL055705; Thu, 16 Oct 2025 16:58:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwJF0055701; Thu, 16 Oct 2025 16:58:19 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:19 GMT Message-Id: <202510161658.59GGwJF0055701@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: 5e482104ecfa - stable/15 - 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2 commit 5e482104ecfa57b6debc3c495f2dcb2d2ea50ea2 Author: Olivier Certner AuthorDate: 2025-10-07 10:03:07 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:39 +0000 sys/rpc: UNIX auth: Rename 'ngroups' => 'supp_ngroups' for clarity MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit bda3b61512b2597d4c77d2b9c9074b844dec0405) --- 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; }