]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/putgrent.3
Minor heading changes and reformattings.
[thirdparty/man-pages.git] / man3 / putgrent.3
CommitLineData
fea681da
MK
1.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2.\" Distributed under GPL
3.\"
0ed55ece 4.TH PUTGRENT 3 2003-09-09 "GNU" "Linux Programmer's Manual"
fea681da
MK
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 );
fea681da 13.SH DESCRIPTION
c13182ef 14The
63aa9df0 15.BR putgrent ()
61f4934a 16function is the counterpart for
fb186734 17.BR fgetgrent (3).
0c2ec4f1 18The function writes the content of the provided \fIstruct group\fP into the
c13182ef 19file pointed to by
fea681da
MK
20.IR fp .
21The list of group members must be NULL terminated or NULL initialized.
22.sp
0c2ec4f1 23The \fIstruct group\fP is defined as follows:
fea681da 24.sp
b9f02710 25.in +0.5i
fea681da
MK
26.nf
27struct group {
b9f02710
MK
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 */
fea681da
MK
32};
33.fi
b9f02710 34.in -0.5i
fea681da
MK
35.SH "RETURN VALUE"
36The function returns zero on success, and a non-zero value on error.
a7fadb55
MK
37.SH "CONFORMING TO"
38This function is a GNU extension.
fea681da
MK
39.SH "SEE ALSO"
40.BR fgetgrent (3),
41.BR getgrent (3),
0a90178c
MK
42.BR group (5),
43.BR feature_test_macros (7)