From nobody Mon Dec 16 14:45:27 2024 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 4YBjRC58w3z5hWY9; Mon, 16 Dec 2024 14:45:27 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YBjRC2nDJz4cd5; Mon, 16 Dec 2024 14:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360327; 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=PxhBs+cq3AaJUIeZNxE/8riqQ09Ml0Z5Wjc5Pfe11sg=; b=fTgDSkhCTbS8qmMAg6fjcZ2Nv9TlRvLphAjPMmX9IK8qoD+CmSCY6bNYCzS7RkL1wB2VCp TWophcdc5Bz/10C03XvZDCxv69pE9U7+/fVEeKykMcGuYHheCtw/bVs/k4jnFYj7ovkagy JQqw5+uuLfYnOrZzNM9bf2tDkSLksgdTk5QD+JW5vPUnxKeqwCKJn6U4UMiGAbqeKNRKte yintU/O1BvxM2isYeenvjbXh5XSERwUphtsDz7JA/gsOTcNOl+GFdHyXnMeTFATTckDk4B iVH1m1fA212hkdkSkRKZN2keXXygeJ7vIsPsr9qFUSIaUsxpTOYsaMQIU02ZdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734360327; 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=PxhBs+cq3AaJUIeZNxE/8riqQ09Ml0Z5Wjc5Pfe11sg=; b=kk57hnETgUJZVe84wXsjxtkRoO2W2FR9z9r2IWGwmat4Lv/ivyAExSG/NYMDp2WVZZqQWn /P/9C9JT9y9nll3kXm3wscxhP0cImOxcZd4qbV6+qtF0ITiJL7hrDkC4+RkliezAYzlEsB 0u2w14zeONuiCU7qfeS195knpoM/2j2v3wWp+EOAl6x8EA1poMlO2pkQHtmCuD4nJ1lpjH ldL+mmaYJRvYOZ5KtigjZnrBo2pdZ+7CNCMf1HifnlCPw0wxkyxIOuXk4GwCLtHyyRlhf9 VN7ud1IOsaRTns8dsBhwUWamKUFDJl7dedN/sTRA05ZF/skGE1+eOmAk92SJ2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734360327; a=rsa-sha256; cv=none; b=fHqZIRW67oKTxaOn4xPW+OfvJb+L1+wkmVAL3sTv2+aB5X/sGnum/3aT9N94n4zpfTtkb5 1zhnAKbNf9LVvnxskyzbu4A9Nz37ncf85n3VM57MCPGYtAa0ZAuXMp+5XdD/u2vsAmEQtc GGIzncAfJpn5rQsy/oBY5lj6EtSJYjs9adXVhidRa5pHZ4aFjpHRqZJAHVqQD4d4drX9XW R4wsGyEEkLigBJHL+7n38ymQGMaJPtzn6LSzCDt2PXT6AFOT1e6Ezw2v5HY2cUrqQS2F9f qT4tXUrkqI2p8XwEFDCawUsbTF5uxC5usKD1eHrIaMWpuB/C8bFwQCSV4ArkZw== 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 4YBjRC2Nmhzy08; Mon, 16 Dec 2024 14:45:27 +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 4BGEjR7U052005; Mon, 16 Dec 2024 14:45:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BGEjRCT052002; Mon, 16 Dec 2024 14:45:27 GMT (envelope-from git) Date: Mon, 16 Dec 2024 14:45:27 GMT Message-Id: <202412161445.4BGEjRCT052002@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: 7f7f3b6cafac - main - 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/main X-Git-Reftype: branch X-Git-Commit: 7f7f3b6cafac6e8ab993a14386e34991224f86f3 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7f7f3b6cafac6e8ab993a14386e34991224f86f3 commit 7f7f3b6cafac6e8ab993a14386e34991224f86f3 Author: Olivier Certner AuthorDate: 2024-10-03 14:49:40 +0000 Commit: Olivier Certner CommitDate: 2024-12-16 14:42:30 +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 --- 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 585eb266e261..76a5fc6fae93 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -3653,8 +3653,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; @@ -3688,7 +3686,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; }