From nobody Fri Jan 17 12:27:13 2025 X-Original-To: dev-commits-src-all@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 4YZJrz4lHWz5kvJ9; Fri, 17 Jan 2025 12:27:15 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YZJrx65gbz3TkR; Fri, 17 Jan 2025 12:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116833; 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=TKOBb7l9pKsfGdzmnIS4GT63VeG381NdU+xTaP5RoZA=; b=K0wtlZyy+nb8F7+Znfv/C2uV+s0amjKhl+FSxGO2v0Nvl5qE7kOS3osFR9h2Wcds/IJ4xL o4aB7TomaLq7C3fO7aUZNLEAxRlECbXcyEYlsC7VuaF2W4zNIyWNKNXl+RMT55nJk/xPzo OmeMVauBmJo7XFsr100i5jE9o4wU6zOdifXCohPQm8DDYFf90iY5yFkPJQfaJ20e7ijo0p DhYr3T9/hThVu0FRPsJeXVttAlz06GUxc+Ba3oNbNQ7f+e3ADHf8N7J7l+i5d0DslMWC8n T2uBxclkt4d3c6kSb0gwSHAfFRD6GWtjgTHJRRNenSiPlY5py5YYXT2+6eNaEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737116833; 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=TKOBb7l9pKsfGdzmnIS4GT63VeG381NdU+xTaP5RoZA=; b=kY+t0kR/TJGHZVvrhmrha+7bbGZe3+ZztJgGtaXROz2XaR1PpPMoqjSZrXU2fb8qBc0c4P 6cLn0iqsSaLrTr7jwgKcCJTWJTn9Pya6hjU+1sWaMuamwkBsRp4Q5xtGHS34p7JA2LmCoL a0ikXJx3CcrFa4aBoAtMhu84lB/cc4ZHWjuzuTEgJ51ivOgspzR/mMj2M+pAD7D0zmZisk /T44vfYw82fivYW6GYtxCcm2DRKR/BrAFNWF5ANDqyE3WVHj9x58ciisl0bHaqOP9tXXNd 7jZGswodwSCFitxw/KAqRQrxs/iCGkZZ7P97TflQdOsVpfbkPGBdOD2ZYTinjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737116833; a=rsa-sha256; cv=none; b=YulamOYlUSVLDYUKiDIxiTOYa9bZSTNmR06UB6+sJVe8VwCPrWoGqKN0IGyjVftWQvsobk c9lSYb0UCNHaI7WT4FgVMMOJRP7paJ77d8s4/bu6XopCA1jH3ZhWq/urXUtseWqHAGSgCk tYc5CmwOT7ie0aHJHanwwhoMr3+iCw6FnTb9/xDMDea53vtrOGuBjib5r+8AmJOQXQD0sg a/leXOj0sJbU74SLQcxBCD6kO82S9xlqMUIO33iHXNwQGtFQIp2u7QTj9H8EadBxW6IDQW W16dBvv8P3sDwVquAi8Y5++aTPjGj35qvgC0+gxnOyy09WjKwgNlq8JfAgo8iQ== 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 4YZJrx5j96z2ly; Fri, 17 Jan 2025 12:27:13 +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 50HCRD6O052486; Fri, 17 Jan 2025 12:27:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HCRDUq052483; Fri, 17 Jan 2025 12:27:13 GMT (envelope-from git) Date: Fri, 17 Jan 2025 12:27:13 GMT Message-Id: <202501171227.50HCRDUq052483@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: 043e259e41d3 - stable/13 - mountd(8): parsecred(): Groups limit: NGROUPS_MAX => NGROUPS_MAX + 1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/13 X-Git-Reftype: branch X-Git-Commit: 043e259e41d3f17f3c9415db0135ad82cb532f1f Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=043e259e41d3f17f3c9415db0135ad82cb532f1f commit 043e259e41d3f17f3c9415db0135ad82cb532f1f Author: Olivier Certner AuthorDate: 2024-10-03 14:49:40 +0000 Commit: Olivier Certner CommitDate: 2025-01-17 12:24:52 +0000 mountd(8): parsecred(): Groups limit: NGROUPS_MAX => NGROUPS_MAX + 1 Lift this unnecessary limitation. Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46921 (cherry picked from commit 7f7f3b6cafac6e8ab993a14386e34991224f86f3) --- usr.sbin/mountd/mountd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 6b3a9af1c279..cdf42de2fcdb 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -3612,8 +3612,6 @@ parsecred(char *namelist, struct expcred *cr) ngroups = NGROUPS_MAX + 1; } - if (ngroups > NGROUPS_MAX) - ngroups = NGROUPS_MAX; if (ngroups > SMALLNGROUPS) cr->cr_groups = malloc(ngroups * sizeof(gid_t)); cr->cr_ngroups = ngroups; @@ -3647,7 +3645,7 @@ parsecred(char *namelist, struct expcred *cr) } else { group = name_ul; } - if (cr->cr_ngroups == NGROUPS_MAX) { + if (cr->cr_ngroups == NGROUPS_MAX + 1) { syslog(LOG_ERR, "too many groups"); break; }