From nobody Tue Sep 23 12:03:48 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 4cWJY14GyHz68YSC; Tue, 23 Sep 2025 12:03:49 +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 4cWJY10LdDz3FDM; Tue, 23 Sep 2025 12:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758629029; 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=Xr5Ht6ftMyF0Zc4FqxZSVsd7CbOX7AK2yEyQxC6P2gk=; b=uthIyWjyul+CvKOT40RV5doWxQNZSgXkNKrsO3eInR7bseJCHd30ouuaAEVqH/0tKLBFZg yFkboTMkfkyTIL3wb6o5JRAmdSJp2mngPxZXl7xZvJqS5qiy7ZSJKM1Dkq2N1YhDEB3YCb 5/jbVn5oSgzO66vyxDRSYwbzVTytvN1kM9CXDDh7BispMk1uCU+iC8buha1yUAvzbEPrl5 ijhiBrudOro5sQ5aKW8A4XAfjoh/iBxPIzbisC/L2GjHwzGTKDNtYScxu7GjqMYj2e9qWS GWRjuhquyjWj0ZeRZk/iHrpyFrOCyGOH77eZNNjJXzgTVPrh2JrGlufTZ9p76w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758629029; 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=Xr5Ht6ftMyF0Zc4FqxZSVsd7CbOX7AK2yEyQxC6P2gk=; b=ifbHgZK9qv/OnLbc5gEquYU7coFsMNaQhyfcc2wuOhEjsbvhXrLjvIMIAyoQTtwwmGY5HF VDpfvP7C1Tgks8a7Siu1crXc1/mmwXnqJvLaXBqIQdTFmRkrRfFCFvAZywKglbtCrxAM8P CF6bl0POBXfwPaZyQV6FS+1G5hm+UoUJ5LP0i+UlkIX6WIKX/4ea2i3gTgGfiAnaSchWB+ LdLa18X274beIbbsbSbGInn9qd0V7g5fSdQIOBoEmdY5qHaHSv6X5D8IrRMnD4D31ADwBL GdHL4Usb934buSBUZd5o8zbGcRjWLSf4/X/sn7HSzHvU/8GOmOMVU8+fXfTE6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629029; a=rsa-sha256; cv=none; b=yKvxmRs3FNhMN/54qck7q4QDoIWvliv4J9adi4tHZRONs2CKHUsnLGsqiGtfmWWwi2UheE 9WVFzms2y23+m0hq5wZxInitY7nZ1i5Ba4gzTIx8nL3rbDr4NvERiEhz3cQnNRzsb209dl JUDP3ad7fXdHTQLIyLRDvelYt08OT796NSlOW80Q6yR8L9lMNW6Mq2bQCNjLVLpiiJN4eS AfBlUdlv278C57IsYgIqrSR5f9O39XxoDQ7JubWmpbFajz88tjMuBEae2yoOKejaEsn8B9 EQbsAsvcLUvVy5qWus4UK0JNmUHUlgyP3FYVNK1KJqgj2PY4NgFmAZqX7zlHgQ== 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 4cWJY06yxwzlXd; Tue, 23 Sep 2025 12:03:48 +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 58NC3mcx008943; Tue, 23 Sep 2025 12:03:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3m8W008940; Tue, 23 Sep 2025 12:03:48 GMT (envelope-from git) Date: Tue, 23 Sep 2025 12:03:48 GMT Message-Id: <202509231203.58NC3m8W008940@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: d0aa1b863d7b - stable/15 - getgrouplist.3: Rework, use more appropriate terminology 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/15 X-Git-Reftype: branch X-Git-Commit: d0aa1b863d7be92d2c86f292f7b32f55240becf4 Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d0aa1b863d7be92d2c86f292f7b32f55240becf4 commit d0aa1b863d7be92d2c86f292f7b32f55240becf4 Author: Olivier Certner AuthorDate: 2025-08-29 14:53:52 +0000 Commit: Olivier Certner CommitDate: 2025-09-23 12:02:46 +0000 getgrouplist.3: Rework, use more appropriate terminology Bring up to date with NSS by substituting "file" with "database". Describe more precisely which database is accessed, i.e., only the group database, which value should be used and where it lands in the result. Prefer a terminology referring to POSIX terms, i.e., use "effective group list" instead of "group access list". Reviewed by: gbe MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52283 (cherry picked from commit 9294eb44eecb71f573f29ff84ce1bd3aa93c077c) --- lib/libc/gen/getgrouplist.3 | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3 index e9a980f99751..e3939fc2481a 100644 --- a/lib/libc/gen/getgrouplist.3 +++ b/lib/libc/gen/getgrouplist.3 @@ -1,5 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,12 +33,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 26, 2014 +.Dd August 29, 2025 .Dt GETGROUPLIST 3 .Os .Sh NAME .Nm getgrouplist -.Nd calculate group access list +.Nd produce a user's effective group list .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -40,16 +48,16 @@ .Sh DESCRIPTION The .Fn getgrouplist -function reads through the group file and calculates -the group access list for the user specified in -.Fa name . -The +function reads through the group database to retrieve the supplementary groups +for the user specified in +.Fa name , +and returns the effective group list, whose first group is the value of +.Fa basegid +and the others are the retrieved supplementary groups. .Fa basegid -is automatically included in the groups list. -Typically this value is given as -the group number from the password file. +typically is the user's group number from the password database. .Pp -The resulting group list is returned in the array pointed to by +The effective group list is returned in the array pointed to by .Fa groups . The caller specifies the size of the .Fa groups @@ -70,6 +78,7 @@ Here, the group array will be filled with as many groups as will fit. group membership list .El .Sh SEE ALSO +.Xr setcred 2 , .Xr setgroups 2 , .Xr initgroups 3 .Sh HISTORY