From nobody Thu Oct 16 16:58:23 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 4cnZ0K1J7Tz6Cnm4; Thu, 16 Oct 2025 16:58:25 +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 4cnZ0J06lyz3k7r; Thu, 16 Oct 2025 16:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633904; 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=AxwCYJbEllXuDGZKmQ9FrEvVj3omrW4zKIRREYOQ+/s=; b=PKuJZH1rKOffWdBOVkjjdL6UatVa94rifs8vrv0ckREGC5BTXyulz+3L9DRWEEBIOYw6RF Z8SEoLEt2MaWSekxm6BOghPU6WUd9kB/zv2/E2ffUkXcW9nHi51Vrgg9G/cyWCHmbsHIZb rRdvbuzHk5UDU3E4SKFe04oNX5mSREVPOeKDjq1fH7L3QDjdcdN55IhpBkENKmnw46oJDB H2vu8m7rdmkLiBZh3ZTzAtSp0/t2MRf8j/4zrs5IxAtHx2JVPC7PycIiFiAIn5sRpmjSkh QFX5SUfwB+3f5GpLbOiyGoJYRteX3ddNu+gVvU5abnDsolasL8Gc/OWkNAmbeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633904; 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=AxwCYJbEllXuDGZKmQ9FrEvVj3omrW4zKIRREYOQ+/s=; b=TxSku8tcwl6XmQm38fR8CSd5J1MrPxSxqcIFBXgRWScElwb0Sa8hZvLrcU6ZphI3nxJp8A zNIKa5khnu2lq5HMEJjFaj1uKU/MFxjDvFwvDWxsDklHZABDGkMwiSzCrtu5new0tF/yxf kMcPov3pLWtEEzhAUzuzYwXTJn6FTbkfccoLPIi9VirAYM8pFusmWwTs/pB0pp+kuZtNx9 zae0Pynt0/84Pgbkv4oiTONpYT6Mu00/6vHdthZ/MqQjYV49X1ASd+Sd9D025um7kBOMme CtrrZlyGdjaQPy8v/wKCPQEJycWDN+lblSmLIAW1cWRpdSSARJSoAjjq5J4NAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633904; a=rsa-sha256; cv=none; b=S8gYz3JmmDuJpLfmUL9/WCYpqrjDGXn0frAFWbgTWpAFA66W6oyX0dkcJ7AqWdG2doGf5s DJ+gWH2wbkaWNLNOENcEJ3Zuh6vomD/3+S9RFTv+InGUKBokceQRec/vlbc8ockEgw0nca 7ty5pJcj6X+Hvfeluqevek+LPqDTr/CDAl43SNvKGcVUawoOcq6WF5fS6TDpjjHONvnfeN VQhMnDl7GjclUq6iUriPWFzClF62r0GecfmvEYlCI9aMUhezcnrRSpoN+2YVVHkb0TEDAS Ke1nH7vs5PkH2xE0h1ORQKnpEkL16PLxhxs+GOSrpIZ0bYfz9QBJMfV7fVoMQA== 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 4cnZ0H59gyz2Rl; Thu, 16 Oct 2025 16:58:23 +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 59GGwNSK055840; Thu, 16 Oct 2025 16:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwNLB055837; Thu, 16 Oct 2025 16:58:23 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:23 GMT Message-Id: <202510161658.59GGwNLB055837@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: 9763e76cccf0 - stable/15 - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2) 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: 9763e76cccf05d405e0fd9c9c351808993e93b14 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9763e76cccf05d405e0fd9c9c351808993e93b14 commit 9763e76cccf05d405e0fd9c9c351808993e93b14 Author: Olivier Certner AuthorDate: 2025-10-07 13:33:53 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:45 +0000 sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2) Remove local defines from 'svc_auth_unix.c' and use the new limit macros instead. Reviewed by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52963 (cherry picked from commit e665c0f6f7a611d25d9d7e7f64d98c84b3a92820) --- sys/rpc/svc_auth_unix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index aad4e7610795..b3389bc79511 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -50,9 +50,6 @@ #include -#define MAX_MACHINE_NAME 255 -#define NGRPS 16 - /* * Unix longhand authenticator */ @@ -76,7 +73,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) if (buf != NULL) { time = IXDR_GET_UINT32(buf); str_len = (size_t)IXDR_GET_UINT32(buf); - if (str_len > MAX_MACHINE_NAME) { + if (str_len > AUTH_SYS_MAX_HOSTNAME) { stat = AUTH_BADCRED; goto done; } @@ -85,7 +82,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) xcr->cr_uid = IXDR_GET_UINT32(buf); xcr->cr_gid = IXDR_GET_UINT32(buf); supp_ngroups = (size_t)IXDR_GET_UINT32(buf); - if (supp_ngroups > NGRPS) { + if (supp_ngroups > AUTH_SYS_MAX_GROUPS) { stat = AUTH_BADCRED; goto done; }