]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/putgrent.3
Added a few more standards.
[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.\"
4.TH PUTGRENT 3 2003-09-09 "GNU" "group Database Access"
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.sp
14.SH DESCRIPTION
15The
63aa9df0 16.BR putgrent ()
61f4934a 17function is the counterpart for
63aa9df0 18.BR fgetgrent ().
fea681da
MK
19The function writes the content of the provided struct group into the
20file pointed to by
21.IR fp .
22The list of group members must be NULL terminated or NULL initialized.
23.sp
24The struct group is defined as follows:
25.sp
26.RS
27.nf
28struct group {
29 char *gr_name; /* group name */
30 char *gr_passwd; /* group password */
34c97781 31 gid_t gr_gid; /* group ID */
fea681da
MK
32 char **gr_mem; /* group members */
33};
34.fi
35.RE
36.SH "RETURN VALUE"
37The function returns zero on success, and a non-zero value on error.
38.SH "SEE ALSO"
39.BR fgetgrent (3),
40.BR getgrent (3),
41.BR group (5)