From nobody Wed Sep 17 12:19:17 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 4cRd9f25Ftz67Hwv; Wed, 17 Sep 2025 12:19:18 +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 4cRd9d3bm0z3W07; Wed, 17 Sep 2025 12:19:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111557; 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=w7qiQRjTMl5Qoqas796/9+iypYsP/ygYByK8gcgv0N4=; b=wU2S67zRW8SAkYwjgRorzSPp503TuOkektJA+Ni+CNLFykfeqA2Tdtd5P5Oaqqlr+qhVTY FClRmfzSf30J2yvvm7TyVTochTcms0GpzSVsb9LZo5HZ4zY7XIvlNitXucgFXTxOthiwJg Td8yfvm76IUWEiXckOME+Mv0/Ygx/k1Ak/sBP0AW60qvmUStfVW6NAfBgvntj5ekVFFP/9 3MwN7V1OVM8rXImN5kpQ9O6Q10HF5XtY9+ZxiC0+l/I242vLXyYMYu+NfIS2XKMhjgHL0b akNp/9MNP5mS/FqgC3NMFgctlbZkXDNkb78tufSa+JYAvxlt9gGAPAM1ZARpcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758111557; 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=w7qiQRjTMl5Qoqas796/9+iypYsP/ygYByK8gcgv0N4=; b=H6cqOJxZcO4GFtb3E1tHoP+0jmkzDSqQzHNwJBPSUy+Gstbw+WqeV5ih98ND91VdgItx9p 0aG0YyvnhvMN5B7W06g2Buu+e7oxbk8tW9xOcVlxtTRIIoVUUsPbBLyP6h1oJv5GVdOPfE Epa9HXXoss1+4s3WS4dY2H1cZGR0N5er4kE60U40zpKuRvYlodeYGbP2bLZj35mYFWtDK5 o/jH5TPhinD67dpv2IO7lXm0LN2st+nTRctGl64WXMeyj6haJg3wrROLoRUunLtq2OoIRP 5B9w0K9A0ozID5523S93e9jj9izmciQmBqmM1UjPkMN2yFrXtY904Oe1/hAFiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758111557; a=rsa-sha256; cv=none; b=mM8CGMRijXUU3dgmb1MncISszT7eD482M4nSQqLCWP+RvJgdpRQgfInHI2PshUu+6iIMi3 qu6ef6otfjE91LcNLmFBduy6JfuvNb922PDSQcP8pM2jB7va9zfhDVPFyCzhk2hzxS/Hwt mq16o5o3lF1TV7/T3WMzMFYX6AE3boqVDf7O4tvdH7n7jWhDvwurE2chT15Q6C4GI2qwY1 IFXwxc2qD4LgyBjV3bNKTX7tpwnByINGMceSU7Nm6u97noFiT2bTUAI71HuwobaDrODNZG QDg+an8XGkpEKTa9KWpy0KNvrM8pYKaqelI6PTnoctsaE4aHogAvxDYjVLBgxw== 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 4cRd9d2kgqz9Jj; Wed, 17 Sep 2025 12:19:17 +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 58HCJHpv086124; Wed, 17 Sep 2025 12:19:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58HCJHHb086121; Wed, 17 Sep 2025 12:19:17 GMT (envelope-from git) Date: Wed, 17 Sep 2025 12:19:17 GMT Message-Id: <202509171219.58HCJHHb086121@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: 9294eb44eecb - main - 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/main X-Git-Reftype: branch X-Git-Commit: 9294eb44eecb71f573f29ff84ce1bd3aa93c077c Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9294eb44eecb71f573f29ff84ce1bd3aa93c077c commit 9294eb44eecb71f573f29ff84ce1bd3aa93c077c Author: Olivier Certner AuthorDate: 2025-08-29 14:53:52 +0000 Commit: Olivier Certner CommitDate: 2025-09-17 12:16:07 +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 --- 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