tail head cat sleep
QR code linking to this page

Manual Pages  — GROUPMEMBER

NAME

groupmember – checks if credentials mandate some group membership

CONTENTS

SYNOPSIS

#include <sys/param.h>
#include <sys/ucred.h>

bool
groupmember(gid_t gid, struct ucred *cred);

bool
realgroupmember(gid_t gid, struct ucred *cred);

DESCRIPTION

The groupmember() function checks if credentials cred indicate that the associated subject or object is a member of the group designated by the group ID gid.

Considered groups in cred are the effective and supplementary groups. The real group is not taken into account.

Function realgroupmember() works the same except that it considers instead the real and supplementary groups, and not the effective one.

RETURN VALUES

The groupmember() and realgroupmember() functions return true if the given credentials indicate membership of the group gid, or false otherwise.

SEE ALSO

getgroups(2) setgroups(2)

AUTHORS

This manual page was initially written by Chad David <Mt davidc@acns.ab.ca> and was revised by Olivier Certner <Mt olce.freebsd@certner.fr>.

GROUPMEMBER (9) August 18, 2023

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

Today, the Unix equivalent of a power drill would have 20 dials and switches, come with a nonstandard plug, require the user to hand-wind the motor coil, and not accept 3/8" or 7/8" drill bits (though this would be documented in the BUGS section of its instruction manual).
— The Unix Haters' handbook