From nobody Thu Jan 16 18:08:24 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 4YYrT44hpDz5kkm5; Thu, 16 Jan 2025 18:08:24 +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 4YYrT4278Vz3Rkh; Thu, 16 Jan 2025 18:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050904; 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=Eu46sXwIH5XNLfwkBTs1YmP+Cz6NnP0Z7mshCJtt69w=; b=niGxpK+q2qrihropIyWnrWWxheXB+Gmwl+aqpn4VhZXi6Bi1YDqVWIiE0e2pqnm4gObleS XpJA3zI7RW1hcpAXII4aYQikmFVyv/HdWlq8X5mR5vxHj/E6t+d7elgc5P5oFPJeht06oT N+ZDmLtYbdvVmGg/nUpjkoxj2pBbaYEeMuQT/RWUpTDnkS24zP5iYErGo/lSpRbinNVvMC WvoTGF4gLMFR66tCuG/n5Puk0Z98glsTla+jfAR7aIg8GeYWS+hdOriwProtFt3jhUJMc5 gn8r3BQOpiPCcxHBxSX7sfLvx0XdCHKmqViykR9yVRucr5qsao14piGwzVPz2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737050904; 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=Eu46sXwIH5XNLfwkBTs1YmP+Cz6NnP0Z7mshCJtt69w=; b=diYeoHnmcUjZTw8Jc5sp+Z57Nh0IApMueJCiPmOsHPuv8IRHZhRb3C7ErAj8xgLifYl0U0 7bolKi/OfM2s3x6Wd6cMS4IC1B13A1Rq5gd+QZSqHSTOBL0mU5a2eopbviw6socFP5etMo xqgHAUoYGvkbD1GI5Ddd3ehPRqKcQm3tengucGd4bYK//3ah1B+21NvtR+iPHjGLU+o8jQ e6mDjX7s08DId85eYZedJP19odeBNIhjJVdab56yIZJ3lnVPauWf//MR6a89e4PH+6YKne 3IcZRwMbUjhMT0vuZiyHmu88myEDD2AussrdjW3mLb3ZQmfhTUS/pgUdls1RQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737050904; a=rsa-sha256; cv=none; b=DbvOR48dOaped7AGUl0R10jNJuiDK5rBpZrxbwtsYM6ZVKG2NHIdXpBcviOUFljNjNVyJt Ro4AizFvlhlrtkNPhxj4gKXFeb9IXufqZrSitwqIxcRyb7iUkWIQzWnCIoiq0Gei90MnZo yQ8PebxaFqstYif9148TyeC44P4Jv0OeE3UCAPYZP2O+JgLLn7WklnZu9r2hS9bEBzcj40 y6FIl7X9nJlaMPVNVprSgGU1tZChcarLjmkNHz1BwB5dG/ELRPArCLA1LyBiJR2fGSrhPB OOH4mIxfvSnyFE3V5nEFgtIQ0PwLklYOFeupRe4aR9MKweIx3WP2leuoO7BiYQ== 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 4YYrT41kfFzkKj; Thu, 16 Jan 2025 18:08:24 +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 50GI8OYs092219; Thu, 16 Jan 2025 18:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50GI8OhK092216; Thu, 16 Jan 2025 18:08:24 GMT (envelope-from git) Date: Thu, 16 Jan 2025 18:08:24 GMT Message-Id: <202501161808.50GI8OhK092216@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: 3f0b888ae3d0 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 3f0b888ae3d0b3a9bf520af9a5708d271a9198f8 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3f0b888ae3d0b3a9bf520af9a5708d271a9198f8 commit 3f0b888ae3d0b3a9bf520af9a5708d271a9198f8 Author: Olivier Certner AuthorDate: 2024-10-03 14:49:40 +0000 Commit: Olivier Certner CommitDate: 2025-01-16 18:06:58 +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 8ee8280b5d67..55db501332bf 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -3655,8 +3655,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; @@ -3690,7 +3688,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; }