From nobody Tue Oct 17 19:43:31 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 4S94Cm0BhCz4xvd1; Tue, 17 Oct 2023 19:43:32 +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 4S94Cl6Zzzz3Kps; Tue, 17 Oct 2023 19:43:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697571811; 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=m6SZFWGxVFrsG6pALfnC65XpPhZflXGU/qAmb7PyU7I=; b=HN/DADEL50jjJi3vv4d/kVghKkMLpTWJSeWV76EKeTe3pwmsEnf0CkadTNr1TaUXB2UWHa Q7A/kzpm88LuV2qqMOvheIW81PUUqCbJd3cxBVcatQiKduL8Ruh6EhAquCDsZkR3JKNZb8 OPeU6VCXWs3ZdCJvJ1h7rWeHLx0a54Bu+wE0QI8wj8gsLQ1Zph7RTLmobFw4xk/0O/aa5P gn0u/WoOqb4AKSWGV5QmQvTp2TcymtWT3+hRz9px04J7GBx5w7DD3d7Nnhhd3cZrvIo6t3 E6YTzYjY53HE/pybHLlcZaRmFEf543qjMngXckI4263XLzb/Ld/jPifnc608eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697571811; a=rsa-sha256; cv=none; b=x6ERSKIS4W7BF0rX02JPspyfdGzstos0dWxFlAxZuuQ0wVGc9yGViBEUN3sDwnjWup3qM1 efAwJFt0VbdJjFVKbRSbbuXlm5NS7u30/tOu2zxAV0SV5qa1Le7NSYr/jjFEq64Pw+OsyZ wpcH6zggomleMZOU0yG13Y64YFI0pNfTKZfeGtodH8ntz+s7yXJqtIsEFYJMmVMS6Vlti0 xpB/BvnExbyScLHcs1+zJLrpdzg93e7+Jegh38SP0qWUq1AxBeuJBlmKGpL5TZMRm1xtsf v6fCiegvDoUyCzRUaCHYTfQWRfNquhBgq95nArOLyycJbuTdme6EmMA8aXHtCg== 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=1697571811; 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=m6SZFWGxVFrsG6pALfnC65XpPhZflXGU/qAmb7PyU7I=; b=U3fDfmcWcvTrVEpjQwEV3jzm94MHE8wqw0cFNxypxA3txkzhLyYuMQqKmRqQPAIQkvJcR+ dfTHFPoSeZk6jSTmm/JOMcRS86YJPEmRyTAsnoEbmN90rXxNRkKxqyzJpObmZBdaoVylP6 VHGLFHhJ9H6iAMVXtQWQOJu8qWnWlQCCkSQOksK/Z/YApPHwObY5ADebIiHRBrqwW36RYh HvfC7e3TeCe8W3tKRKgyx/94I+MvVn79cX1EaKSzWaNY0WJdDwv/EfKpResnPpkITIWm6m XIiSnhKnXU5CHDFouBaSCF9GRyXuTZzDNWffmlCY97hk0ogaEtJMVW1fuCJXQQ== 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 4S94Cl5hj6zd4H; Tue, 17 Oct 2023 19:43:31 +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 39HJhVEo013131; Tue, 17 Oct 2023 19:43:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39HJhVG5013128; Tue, 17 Oct 2023 19:43:31 GMT (envelope-from git) Date: Tue, 17 Oct 2023 19:43:31 GMT Message-Id: <202310171943.39HJhVG5013128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 60cc4f16d4e9 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 60cc4f16d4e91d9d37a4619d708cfe88ff093526 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=60cc4f16d4e91d9d37a4619d708cfe88ff093526 commit 60cc4f16d4e91d9d37a4619d708cfe88ff093526 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-10-17 19:42:58 +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 (cherry picked from commit 75a45ca3b34062fe793ae326ad9da614a1a06df1) --- 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 .