From nobody Thu Dec 21 13:43:30 2023 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 4Sws8M2SVpz54pfd; Thu, 21 Dec 2023 13:43:31 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sws8L6gdpz4NS8; Thu, 21 Dec 2023 13:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703166210; 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=V05bWQWbrPJK5fjY3+OjG3olZOucsP1iAFZDdcsWYYE=; b=SuR2s8HMvx9ypN/NXbB/8VUpXVxawWkNbrad2TMeZ/IcSx+GXS2zoBmuyKk8Ooi/rICf01 XMz1Vf1WzRD+HoKV1OkvGTHit+ONdVw2nWZrnFGZn/Ro7M75vaBd01t4dDE4EJaQYfyUmW 9Vmg0CwcREgFa7cRzya/0svwrLFq+rf3GGDDkevVpvTxZwtYjE+WrQC2wg7ZX5By2/+06b +SztCaonUYd69GdsDmstKd+sNisCY7md2ARpJs89rZO50oRYOpmXsJsi58a4pd2/0RMmhi zK15kc0OH/S9pE6Ie0nvbzIdWSH5OIM8cvtOX5KmVJ2v+Xj4bRw2PMIn7Ww3Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703166210; a=rsa-sha256; cv=none; b=SC+s1lWk9PGiQHLag6heLhatTEMUNa6gZ9O2Qiggjbjnosp2UbcJkOBZY7IQ47TJmiyHah GXms7faASmLR3fOABneGy6TkAUEh0lFSALhGZbVABdaG3pVjKpOrUrcfvXVA8PAVRrWcHq YNasRcp+6KVQRbnCa+V8yTa9ebUknh7ipOec5AQHXGas7mVWtpvqv/2OPnyMw0QmVZJ5xb JrJL15+Spp3T8H24KiFyW0koRDEboeG3b3VpH8+svjkgi0mEZ4D7hfVZZzZ+/BmU6MTfFM 8x71YcyMd//n3RM/HIqQPCgPzXHD8ZPA27LiWfZxT1m0XjQehKzW/KR/cpnwwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703166210; 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=V05bWQWbrPJK5fjY3+OjG3olZOucsP1iAFZDdcsWYYE=; b=ZX75eGtppK1aJkms6eDTyk6UMHAqWJf0kyRqGOzC/huCX1yOCKObl9Fx/0ez3rYMM09wSe OuH9Xpfj7EXehB6GrGh+U5gjNaKJBiH3M0JunV8thUumOD0qkEQloL8l+/PFngfHc3QlNJ g/o6hEo+anBNOJaFUxODTLlS4K4glMy1PNzkN6qJE4xt7U3ck5z0nSum0KEZemoy4+myB3 q7U9IMzTObDLwzznxBIH8tBPQcerCkRntX43s+fuN7Ri2STgXrayxxIVeTyl/4fGhe44Z7 hSMLlviagE+a+aYCbbt8OVtl2IypBo+fSPJc3z193ZKVdxES0zhJFFWpwon9QA== 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 4Sws8L5lMrzb4F; Thu, 21 Dec 2023 13:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BLDhU1a078906; Thu, 21 Dec 2023 13:43:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BLDhUv6078903; Thu, 21 Dec 2023 13:43:30 GMT (envelope-from git) Date: Thu, 21 Dec 2023 13:43:30 GMT Message-Id: <202312211343.3BLDhUv6078903@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: d23893ca4dd0 - stable/13 - groupmember(9): Detail which groups are considered, simplify 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: d23893ca4dd00425814e23c87382ac20d8b0542a Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d23893ca4dd00425814e23c87382ac20d8b0542a commit d23893ca4dd00425814e23c87382ac20d8b0542a Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Olivier Certner CommitDate: 2023-12-21 13:36:55 +0000 groupmember(9): Detail which groups are considered, simplify Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40634 (cherry picked from commit 75a45ca3b34062fe793ae326ad9da614a1a06df1) Approved by: markj (mentor) --- share/man/man9/groupmember.9 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index d447bf64c482..3a516622efce 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. +.\" Copyright (C) 2023 Olivier Certner .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 9, 2001 +.Dd August 18, 2023 .Dt GROUPMEMBER 9 .Os .Sh NAME .Nm groupmember -.Nd checks group set for a group ID +.Nd checks if credentials mandate some group membership .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h @@ -38,21 +39,26 @@ .Sh DESCRIPTION The .Fn groupmember -function checks to see if the given -.Fa gid -is in the group set of the credentials. +function checks if credentials +.Fa cred +indicate that the associated subject or object is a member of the group +designated by the group ID +.Fa gid . .Pp -Its arguments are: -.Bl -tag -width ".Fa cred" -.It Fa gid -The group ID to check for. -.It Fa cred -The credentials to search for the group in. -.El +Considered groups in +.Fa cred +are the effective and supplementary groups. +The real group is not taken into account. .Sh RETURN VALUES If the .Fa gid -is found, 1 is returned; otherwise, 0 is returned. +is found, 1 is returned, otherwise 0. +.Sh SEE ALSO +.Xr getgroups 2 +.Xr setgroups 2 .Sh AUTHORS -This manual page was written by -.An Chad David Aq Mt davidc@acns.ab.ca . +This manual page was initially written by +.An -nosplit +.An Chad David Aq Mt davidc@acns.ab.ca +and was revised by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr .