From nobody Thu Sep 28 15:10:42 2023 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 4RxH3k3Rkwz4ttqD; Thu, 28 Sep 2023 15:10:42 +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 4RxH3k2pplz3YGh; Thu, 28 Sep 2023 15:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913842; 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=wng7FCZlRhx257FHklYMjtuZGTzHVoUk8yu8L5kIRzA=; b=O6qOsiQiVp3kwk3Bt3vzwOxNMgHnrsv91gWqJ9a0kHWak/Blvz7lswEo5eV3puRTQlZmp5 O09G6RRf7seLZW9Sg2XuEQxvF+NlbBJQHBe/rO5E0l3scmZT3+IwF4b4uyaegkUK6yR//L bBQHYrcPY4fqeTOuqF1tLRdlxu+LarsqGIHLheURL1t5O5yfnKvo4QBUU+P7HiwF5dzPGl DRcirY50oF5zd4e+hKA3T20rJK/IM+QxIkjGqVZHx9MlMh0MMwZlgbyktuNXJEwL/nrfS1 QW2clUlj2cua/ic6x726+l0biu+EZ2iMGreZORAubFjGSmoEzPtypIjvk1Dz5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913842; a=rsa-sha256; cv=none; b=Y6T6ydg+dcLMYxj3tJOQLg6L0vsjz6QwbYZ9MUCFZIvM81AkpagbJBcimlz9qD8LBNEra0 8PpqDRrrs4vPxRkBhcGiBDuC87fqYTRmooVmdwPQwlr4H5GYAwEGQHtpEauRV3NOkdER5F XDbLb3+6uxcWOxxGIK0gbsudcDKRwpiAvyyEahTXMlmN+uqMBeXEno0n2VKWPipWLvYZci QjlFOirjZNdIUcTo6WOvhGTV3EA6HHHHJurnJD9HWyDYj+7Ftk9hCONOevcLsfQearN0DU qpASIN8wHj5wf5Ny4zeD31rQEwUDwFQN/VFl5QV/W6wXaNMLp4ZgttjUyh3tuw== 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=1695913842; 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=wng7FCZlRhx257FHklYMjtuZGTzHVoUk8yu8L5kIRzA=; b=D4G36GYCvgY7Ps3Dg4+0sTLXzDyTssJII2nY2twjchX4mUT1aA2Q1MHhoWaayYtASjWfoL H2T3MASuNT5zcHkvJsvSJF+BuQhcUPSg4aePLEF+P859DVY8pxilibFlhMhpj8eA/BNhBu SVuMScl17GC1ftwh4RBZsE11knaFrCMX2EJJeB2S6ON6EUfedqLSoaNgYg/27iGVZbr4eo ZWzDJgn/OkPj5cvnW2EwFBkRLhKuALE6fRO7NydSzXNGW1C4jHnrlQPDDn+/p07vGqBIyf r2ZzjVEXdDpmgmAOaOCSpiVFtrztQ5oslATNXYdKTaJayajOPDrBs/+ZY5J8sg== 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 4RxH3k1XDbzBqY; Thu, 28 Sep 2023 15:10:42 +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 38SFAgrA047478; Thu, 28 Sep 2023 15:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAgFF047475; Thu, 28 Sep 2023 15:10:42 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:42 GMT Message-Id: <202309281510.38SFAgFF047475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 75a45ca3b340 - main - groupmember(9): Detail which groups are considered, simplify 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75a45ca3b34062fe793ae326ad9da614a1a06df1 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=75a45ca3b34062fe793ae326ad9da614a1a06df1 commit 75a45ca3b34062fe793ae326ad9da614a1a06df1 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 groupmember(9): Detail which groups are considered, simplify Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40634 --- 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 .