From nobody Tue Oct 14 12:22:51 2025 X-Original-To: dev-commits-src-main@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 4cmCzH69GSz6CLND; Tue, 14 Oct 2025 12:22:51 +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 4cmCzH3F3Qz3DDr; Tue, 14 Oct 2025 12:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444571; 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=D6UO7Xb9vIGbsi0I3MDtPX9inFZrj6PzqTFOudC/gwA=; b=oPoyzUh9wTjpyOOjfuj/CMeLYyttTmUbf/QaC7CqVktzop4T581cqyp09BrYqgoytWqv3J uuN3Fcxi8tz65Fa1Tvo8AufVv5co2UEDEfKEoAvBKxN9PyOhsh9yAJsxaw3VPGhuDJywQW n8+28fgI0f4HtRADli3CDt1wwzwkP8/W60wOcQeML4DqrYtO/Wem8JlhUBoCKZ/WRS9vPN U61Z7OW07Q0Vj7vOqBP0DWfal4/UCRzGuH3eQWgb2cSAch4sSqb/ntXDRabeLln2JoSBoe NK18JKxtgwdW3fIt02faWNMoF7DxXZy2MvcjFmq6B3zeDoJLR/D4H9Q0/c1eww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760444571; 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=D6UO7Xb9vIGbsi0I3MDtPX9inFZrj6PzqTFOudC/gwA=; b=Q92aPJ/qvMg77h+TAF7LfcLGhwvs8oIs2omzkAXWxLWKcMYn4tZAY0TScMJfP/+q6rlw5x 9UaoejJlpknxQ23ARHrQobSypgZeD63e/HoWkXjL1JVxUk1aukChVSCMJJKHlvGhGOYMKp GTDK1efNTuLfBdDROnZGhDpmCXy4wDlHNcys8YvPvcVThMawJLnIioB0BzvcgCWf2fTsCU ejGsk2d1dM/NxxWQOH2i9PsQF8lgwRQu24FhwQcAcdOhgCaNnT/pMVraPT+52FHvz2XBGC uWUfXLna76LyvQlydNnpxhILVLPm77eT9QRci9arRyeAGtVMeLUti35MwzrAeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760444571; a=rsa-sha256; cv=none; b=GyyrIwZG/IXgvfa5cioFTy3FcDpPT3+RBd3ZgDo3mxZotdXKwZvwvgFqkUOqskfmC2F4GT mpS2pMfH12+XE0g2z/iu/4PEtwm3nOfeQxP7rEraHkWrpiLxA6RyyL65QcPX+MuLdz0GNi hc6WYJ7bNURmrXikt59+ksCj6Z3kji8wgQqfeLIHW32vD+M8zbW1bF08vQgjqLEWare7Zo Ox7uKXEnKwnG/J1fUT82UGJKNl8FK+CtZuShh8pmFknXccZXvFr65Ndg4Y1lJUL5dhKy1F liEtlLjDFQ23A09NX+nlVyIgZVoQw/kGbekA20pQn2oH7eDbD/Fdvee6mJ0KZg== 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 4cmCzH2fr7zsQb; Tue, 14 Oct 2025 12:22:51 +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 59ECMprg019646; Tue, 14 Oct 2025 12:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ECMpuF019643; Tue, 14 Oct 2025 12:22:51 GMT (envelope-from git) Date: Tue, 14 Oct 2025 12:22:51 GMT Message-Id: <202510141222.59ECMpuF019643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: e665c0f6f7a6 - main - sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (2/2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: e665c0f6f7a611d25d9d7e7f64d98c84b3a92820 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e665c0f6f7a611d25d9d7e7f64d98c84b3a92820 commit e665c0f6f7a611d25d9d7e7f64d98c84b3a92820 Author: Olivier Certner AuthorDate: 2025-10-07 13:33:53 +0000 Commit: Olivier Certner CommitDate: 2025-10-14 12:21:49 +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 --- 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; }