getgrset Subroutine

Purpose

Accesses the concurrent group set information in the user database.

Library

Standard C Library (libc.a)

Syntax

char *getgrset (User)
const char * User;

Description

The getgrset subroutine returns a pointer to the comma separated list of concurrent group identifiers for the named user.

If the Network Information Service (NIS) is enabled on the system, these subroutines attempt to retrieve the user information from the NIS authentication server.

Notes:
  • If the domainlessgroups attribute is set in the /etc/secvars.cfg file, all the group IDs are fetched from the Lightweight Directory Access Protocol (LDAP) and the files domains, if the user belongs to any one of these domains.
  • The getgrset subroutine is not a threadsafe subroutine. For information about the threadsafe subroutine, see the getgrset_r subroutine.

Parameters

Item Description
User Specifies the user name.

Return Values

If successful, the getgrset subroutine returns a pointer to a list of supplementary groups. This pointer must be freed by the user.

Error Codes

A NULL pointer is returned on error. The value of the errno global variable is undefined on error.

File

Item Description
/etc/group Contains basic group attributes.