[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

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

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

Related Information

The getgrent, getgrgid, getgrnam, setgrent, or endgrent Subroutine.

List of Security and Auditing Subroutines, Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]