---
name: "groupmember"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/groupmember/9freebsd"
---

# groupmember(9freebsd)

checks group set for a group ID

## NAME

**groupmember** – checks group set for a group ID

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/ucred.h\>**

*int*\

**groupmember**(*gid\_t gid*, *struct ucred \*cred*);

## DESCRIPTION

The **groupmember**() function checks to see if the given *gid* is in the group set of the credentials.

Its arguments are:

- *gid*

  The group ID to check for.

- *cred*

  The credentials to search for the group in.

## RETURN VALUES

If the *gid* is found, 1 is returned; otherwise, 0 is returned.

## AUTHORS

This manual page was written by Chad David ⟨*davidc@acns.ab.ca*⟩.
