ucred.9: crsetgroups_and_egid(): Clarify differences with crsetgroups()
MFC after: 5 days MFC to: stable/15 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52288
This commit is contained in:
+15
-17
@@ -24,7 +24,7 @@
|
|||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
.\" DAMAGE.
|
.\" DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd July 29, 2025
|
.Dd August 29, 2025
|
||||||
.Dt UCRED 9
|
.Dt UCRED 9
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@@ -113,28 +113,26 @@ The actual copying is performed by
|
|||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Fn crsetgroups
|
.Fn crsetgroups
|
||||||
and
|
function sets the
|
||||||
.Fn crsetgroups_and_egid
|
|
||||||
functions set the
|
|
||||||
.Va cr_groups
|
.Va cr_groups
|
||||||
and
|
and
|
||||||
.Va cr_ngroups
|
.Va cr_ngroups
|
||||||
variables and allocates space as needed.
|
variables representing the supplementary groups, allocating space as needed.
|
||||||
They also truncate the group list to the current maximum number of
|
It also truncates the group list to the current maximum number of groups.
|
||||||
groups.
|
The
|
||||||
|
.Fn crsetgroups_and_egid
|
||||||
|
function is similar, but interprets separately the first group of
|
||||||
|
.Va groups
|
||||||
|
as the effective GID to set, only setting the subsequent groups as supplementary
|
||||||
|
ones.
|
||||||
|
It will use
|
||||||
|
.Va default_egid
|
||||||
|
as the new effective GID if
|
||||||
|
.Va groups
|
||||||
|
is empty.
|
||||||
No other mechanism should be used to modify the
|
No other mechanism should be used to modify the
|
||||||
.Va cr_groups
|
.Va cr_groups
|
||||||
array.
|
array.
|
||||||
Note that
|
|
||||||
.Fn crsetgroups_and_egid
|
|
||||||
will interpret the first element of
|
|
||||||
.Va groups
|
|
||||||
as the new effective GID and the rest of the array as the supplementary groups,
|
|
||||||
and
|
|
||||||
.Va default_egid
|
|
||||||
will be used as the new effective GID only if
|
|
||||||
.Va groups
|
|
||||||
is empty.
|
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Fn cru2x
|
.Fn cru2x
|
||||||
|
|||||||
Reference in New Issue
Block a user