]> git.ipfire.org Git - thirdparty/man-pages.git/blame_incremental - man3/putgrent.3
Minor heading changes and reformattings.
[thirdparty/man-pages.git] / man3 / putgrent.3
... / ...
CommitLineData
1.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2.\" Distributed under GPL
3.\"
4.TH PUTGRENT 3 2003-09-09 "GNU" "Linux Programmer's Manual"
5.SH NAME
6putgrent \- write a group database entry to a file
7.SH SYNOPSIS
8.B #define _GNU_SOURCE
9.br
10.B #include <grp.h>
11.sp
12.BI "int putgrent(const struct group *" grp ", FILE *" fp );
13.SH DESCRIPTION
14The
15.BR putgrent ()
16function is the counterpart for
17.BR fgetgrent (3).
18The function writes the content of the provided \fIstruct group\fP into the
19file pointed to by
20.IR fp .
21The list of group members must be NULL terminated or NULL initialized.
22.sp
23The \fIstruct group\fP is defined as follows:
24.sp
25.in +0.5i
26.nf
27struct group {
28 char *gr_name; /* group name */
29 char *gr_passwd; /* group password */
30 gid_t gr_gid; /* group ID */
31 char **gr_mem; /* group members */
32};
33.fi
34.in -0.5i
35.SH "RETURN VALUE"
36The function returns zero on success, and a non-zero value on error.
37.SH "CONFORMING TO"
38This function is a GNU extension.
39.SH "SEE ALSO"
40.BR fgetgrent (3),
41.BR getgrent (3),
42.BR group (5),
43.BR feature_test_macros (7)