Date: Fri, 19 Dec 2025 09:19:09 +0000
From: Olivier Certner <olce@FreeBSD.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject: git: 2e3e62e4de9e - stable/14 - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2)
Message-ID: <6945188d.3c07c.2db131a5@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=2e3e62e4de9efa6f2d55538aa6e7c36cfe849476 commit 2e3e62e4de9efa6f2d55538aa6e7c36cfe849476 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-10-07 13:33:53 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-12-19 09:16: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 c821b7901ea6..97fd08de7f2b 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -54,9 +54,6 @@ static char *sccsid = "@(#)svc_auth_unix.c 2.3 88/08/01 4.0 RPCSRC"; #include <rpc/rpc_com.h> -#define MAX_MACHINE_NAME 255 -#define NGRPS 16 - /* * Unix longhand authenticator */ @@ -80,7 +77,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; } @@ -89,7 +86,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; }help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6945188d.3c07c.2db131a5>
