Blame man3/putgrent.3

Packit 7cfc04
.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
Packit 7cfc04
.\"
Packit 7cfc04
.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
Packit 7cfc04
.\" Distributed under GPL
Packit 7cfc04
.\" %%%LICENSE_END
Packit 7cfc04
.\"
Packit 7cfc04
.TH PUTGRENT 3 2017-09-15 "GNU" "Linux Programmer's Manual"
Packit 7cfc04
.SH NAME
Packit 7cfc04
putgrent \- write a group database entry to a file
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
Packit 7cfc04
.br
Packit 7cfc04
.B #include <grp.h>
Packit 7cfc04
.PP
Packit 7cfc04
.BI "int putgrent(const struct group *" grp ", FILE *" stream );
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
The
Packit 7cfc04
.BR putgrent ()
Packit 7cfc04
function is the counterpart for
Packit 7cfc04
.BR fgetgrent (3).
Packit 7cfc04
The function writes the content of the provided
Packit 7cfc04
.IR "struct group"
Packit 7cfc04
into the
Packit 7cfc04
.IR stream .
Packit 7cfc04
The list of group members must be NULL-terminated or NULL-initialized.
Packit 7cfc04
.PP
Packit 7cfc04
The
Packit 7cfc04
.IR "struct group"
Packit 7cfc04
is defined as follows:
Packit 7cfc04
.PP
Packit 7cfc04
.in +4n
Packit 7cfc04
.EX
Packit 7cfc04
struct group {
Packit 7cfc04
    char   *gr_name;      /* group name */
Packit 7cfc04
    char   *gr_passwd;    /* group password */
Packit 7cfc04
    gid_t   gr_gid;       /* group ID */
Packit 7cfc04
    char  **gr_mem;       /* group members */
Packit 7cfc04
};
Packit 7cfc04
.EE
Packit 7cfc04
.in
Packit 7cfc04
.SH RETURN VALUE
Packit 7cfc04
The function returns zero on success, and a nonzero value on error.
Packit 7cfc04
.SH ATTRIBUTES
Packit 7cfc04
For an explanation of the terms used in this section, see
Packit 7cfc04
.BR attributes (7).
Packit 7cfc04
.TS
Packit 7cfc04
allbox;
Packit 7cfc04
lb lb lb
Packit 7cfc04
l l l.
Packit 7cfc04
Interface	Attribute	Value
Packit 7cfc04
T{
Packit 7cfc04
.BR putgrent ()
Packit 7cfc04
T}	Thread safety	MT-Safe
Packit 7cfc04
.TE
Packit 7cfc04
.sp 1
Packit 7cfc04
.SH CONFORMING TO
Packit 7cfc04
This function is a GNU extension.
Packit 7cfc04
.SH SEE ALSO
Packit 7cfc04
.BR fgetgrent (3),
Packit 7cfc04
.BR getgrent (3),
Packit 7cfc04
.BR group (5)
Packit 7cfc04
.SH COLOPHON
Packit 7cfc04
This page is part of release 4.15 of the Linux
Packit 7cfc04
.I man-pages
Packit 7cfc04
project.
Packit 7cfc04
A description of the project,
Packit 7cfc04
information about reporting bugs,
Packit 7cfc04
and the latest version of this page,
Packit 7cfc04
can be found at
Packit 7cfc04
\%https://www.kernel.org/doc/man\-pages/.