From nobody Tue Sep 23 12:03:54 2025 X-Original-To: dev-commits-src-branches@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 4cWJY70Rvwz68Y7f; Tue, 23 Sep 2025 12:03:55 +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 4cWJY63pHXz3FCC; Tue, 23 Sep 2025 12:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758629034; 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=v2Wkvl5Cc0VmMSczeH1WsRkeafo4yLtiDY+XunmK1Ro=; b=N6B03dX2zuDT2kUZnyOB/43qvMzg5XAIKBcXjfHf3tsSumPMYi7h+2VLymF5S6sW1RvzBI blsLz+4LRf4LxpCqnTyRiI4xJIyxW//KH2v/fzQIyeh1cc8F/wl+g19oZtcRiKjpKaHV3W 5xuynNvikPK7sI7mVXPp351xjDrDHbEEsOUmVSZH5gKahDTtVhz13WeCQzsVLTa5NBe7Da Hgto14Mj3gs60kC41/Asni3i/ahngWaSKDi03fz9DMsVKqvmakFken18Oz+6lFf5B5FdZF z6jNlNhQDwSgONwUdYSTGLHjk5qacCnSs6SVUfAxteyGVP2cO5dgW6rJpxDtUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758629034; 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=v2Wkvl5Cc0VmMSczeH1WsRkeafo4yLtiDY+XunmK1Ro=; b=BQRIezNM5QoxAJkaGJz4cXIG9Lpt7gPyHn7cnEd5ZTQmAajwvQgW+qEMuf/mvxq8NKjdDi Nz9kZMNcDkc+Dm4v7em54yxqZjDf9m8RGTKle4Db+J4sCJSZmGqN/Ofe1Wudcj080lRlPN DSuVUxv0TtZkbOGSairmtqUKNLV1jLbEvRgjtslklGEVyWVWE/wh8SsvktxHDmBTbWID4h DGRpOv5zXb+9B0sjWVZR0SUD4+2bCp+abYixjLb+c4MWRK3MPV0YvKxECAO4uxMKaww9gQ BP9hHnyr8fUgFsc7Js+9A7Y1SQNr4eOklZaLRHO8aHUz6JBMDaOvHie7iOnp2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629034; a=rsa-sha256; cv=none; b=VCW11bUNHKQr3NdYX7j1eua47646BqhyBFbT6NTK49twM+2IiZveYo9U+7ws4L70tBNOwC S0eN5gk12WWI7005qjTnwi5qNJVROrVyT5Fdhhyt+dmUCIf7+0Fy0ZMKElWY+jHq8kTH8C RxFf4OxDxNUWIFugc7meLqvJXIxCas1Ury7WBFbjFZZI8WtHBGvK9JssFnhzxaLEvfrL3h V7nkyTyLZI7ttFnwT4RF0U+Wa0wsSy79f+TRdO+8scAaSv1iyCkX/VDuXJqwTPsDmCuHKq nYItRnDXcHqo8nXuTFYXJPwIKbGSiDwCWywbgN7It2r5DP0siBy7B6IQUaULNA== 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 4cWJY63NVhzlXf; Tue, 23 Sep 2025 12:03:54 +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 58NC3sWu009125; Tue, 23 Sep 2025 12:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3sLF009122; Tue, 23 Sep 2025 12:03:54 GMT (envelope-from git) Date: Tue, 23 Sep 2025 12:03:54 GMT Message-Id: <202509231203.58NC3sLF009122@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: bc71d7400e11 - stable/15 - ucred.9: crsetgroups_and_egid(): Clarify differences with crsetgroups() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/15 X-Git-Reftype: branch X-Git-Commit: bc71d7400e111f5c53a1c6bccbc5083a7e7a597c Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=bc71d7400e111f5c53a1c6bccbc5083a7e7a597c commit bc71d7400e111f5c53a1c6bccbc5083a7e7a597c Author: Olivier Certner AuthorDate: 2025-08-29 15:17:36 +0000 Commit: Olivier Certner CommitDate: 2025-09-23 12:02:48 +0000 ucred.9: crsetgroups_and_egid(): Clarify differences with crsetgroups() MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52288 (cherry picked from commit 6b26d0a335b6222744e2778753086e16389b6029) --- share/man/man9/ucred.9 | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/share/man/man9/ucred.9 b/share/man/man9/ucred.9 index 38759bddb5b0..453df386ff18 100644 --- a/share/man/man9/ucred.9 +++ b/share/man/man9/ucred.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 29, 2025 +.Dd August 29, 2025 .Dt UCRED 9 .Os .Sh NAME @@ -113,28 +113,26 @@ The actual copying is performed by .Pp The .Fn crsetgroups -and -.Fn crsetgroups_and_egid -functions set the +function sets the .Va cr_groups and .Va cr_ngroups -variables and allocates space as needed. -They also truncate the group list to the current maximum number of -groups. -No other mechanism should be used to modify the -.Va cr_groups -array. -Note that +variables representing the supplementary groups, allocating space as needed. +It also truncates the group list to the current maximum number of groups. +The .Fn crsetgroups_and_egid -will interpret the first element of +function is similar, but interprets separately the first group of .Va groups -as the new effective GID and the rest of the array as the supplementary groups, -and +as the effective GID to set, only setting the subsequent groups as supplementary +ones. +It will use .Va default_egid -will be used as the new effective GID only if +as the new effective GID if .Va groups is empty. +No other mechanism should be used to modify the +.Va cr_groups +array. .Pp The .Fn cru2x