putgrent Subroutine

Purpose

Updates group descriptions.

Library

Standard C Library (libc.a)

Syntax

int putgrent (grp, fp)
struct group *grp;
FILE *fp;

Description

The putgrent subroutine updates group descriptions. The grp parameter is a pointer to a group structure, as created by the getgrent, getgrgid, and getgrnam subroutines.

The putgrent subroutine writes a line on the stream specified by the fp parameter. The stream matches the format of /etc/group.

The gr_passwd field of the line written is always set to ! (exclamation point).

Parameters

Item Description
grp Pointer to a group structure.
fp Specifies the stream to be written to.

Return Values

The putgrent subroutine returns a value of 0 upon successful completion. If putgrent fails, a nonzero value is returned.

Files

/etc/group

/etc/security/group