From nobody Fri Oct 10 17:16: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 4cjtgs2wMmz6Bcrc; Fri, 10 Oct 2025 17:16:25 +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 4cjtgs0n5Xz3gJ8; Fri, 10 Oct 2025 17:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760116585; 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=50ZP9IXCwEkRh64/71iheqiUA3C+e1EaXdEUfQYZWQ0=; b=mkJRBU8B4UXmjy/SYSnoCLloqy65nL2v8wZn+dchfWOp5I1IMm3f2xq7WWr530AqfvqtYA RExlr+eUfSEzalgMFmsmseqY6z/G4sGh0BLCrLS/FQxkdA4ReE2nGpeC7REUP8mW0XUBV6 dVCGX6rn6V4Ecbl5GFnABES7d4SITQfFi8ykU0C4JHVv7080GhAK0NQL6t0FSPjfZcGD7z uq9EyjfMnokDOQCKWUE6OoRZlZpDBjlVTIiN38fipjigJY23buf6n4gcaczlH8EMsKWcZe X7ZHWqC+Jk1q8juAH+WVmQZwucsADy0UOkJAf+XMNLKZdVrjORFm9awrJF5t3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760116585; 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=50ZP9IXCwEkRh64/71iheqiUA3C+e1EaXdEUfQYZWQ0=; b=A2NcgZutuN+1MsPjxButRKuaSl5f2H6JS6+tcp7CHKWM6DYT2ZQjhsb75d0HQZbPcvJ+yp WScc2Gmw29Nt4gXVLKONmAGUlLUKd7iQdPS8Ks1D+E5smRk32N0XmzIeAhrg0fIkerERN1 5ho+79U2xiCHKB2BGLDY/UtsjSTJ2TPS2gmo7I7W+NqWjPisHqzhdHJr0MvKZGEthwlxv7 0DeGV9cJFnRNaAk40rxwet9FFQxlca9rt6ztCbEYH/fztjSuHgLgMzMplmqFSmssuH7msf DFKoTGhfTBCGl+EHqoh4BB1T0FC/aCzsyVugQWXoCwp+0I6CrGd7M08gsc0zYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760116585; a=rsa-sha256; cv=none; b=w870i4bNoEvue5BxWLHhhnXLtRD3c8z9ZPGq4SAhlx6jPnlXt8DYvaHplUvJBc5SBj8Ufs 04bZdZ8SGtVv1QdgsP8+lpsPOlJKZZgOmEpAHV2qSSBLQ6XhGIxaC3PBYYlhwGbX1/G3Ia 7MfrIY5Ab3gdezDkol2Pr6epIAhB9/RQvqgK1I4pPNR7L2yxTFvi8kPo251dboX4dh83zX mBuyZ7gepYFJ5pw9q8pMDudrVYFd/7v5xMuqh5D/Pjb/mJ6wHGwtpnWJ/PaPnh3G0KaSp3 ZiwBJnaHhpNeaX7BFDuxdDZ/1UFBfm9Rn8t0V8gKiHHj87pc9Cj/PPTEFzYAXg== 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 4cjtgs033Pz1Br5; Fri, 10 Oct 2025 17:16:25 +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 59AHGOa1009352; Fri, 10 Oct 2025 17:16:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59AHGORT009349; Fri, 10 Oct 2025 17:16:24 GMT (envelope-from git) Date: Fri, 10 Oct 2025 17:16:24 GMT Message-Id: <202510101716.59AHGORT009349@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: 587263cb1ddb - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 587263cb1ddb4c5a506852d675c2d873586155e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=587263cb1ddb4c5a506852d675c2d873586155e2 commit 587263cb1ddb4c5a506852d675c2d873586155e2 Author: Olivier Certner AuthorDate: 2025-08-29 14:53:52 +0000 Commit: Olivier Certner CommitDate: 2025-10-10 17:15:57 +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 a7c478a9250c..09f01e4fc852 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 @@ -27,12 +35,12 @@ .\" .\" @(#)getgrouplist.3 8.1 (Berkeley) 6/9/93 .\" -.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 @@ -42,16 +50,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 @@ -72,6 +80,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