]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/putgrent.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / putgrent.3
CommitLineData
fea681da 1.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2297bf0e 2.\"
95fb8859 3.\" SPDX-License-Identifier: GPL-1.0-or-later
fea681da 4.\"
4c1c5274 5.TH putgrent 3 (date) "Linux man-pages (unreleased)"
fea681da
MK
6.SH NAME
7putgrent \- write a group database entry to a file
44135640
AC
8.SH LIBRARY
9Standard C library
8fc3b2cf 10.RI ( libc ", " \-lc )
fea681da 11.SH SYNOPSIS
c7db92b9 12.nf
b80f966b 13.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
fea681da 14.B #include <grp.h>
68e4db0a 15.PP
59526779
AC
16.BI "int putgrent(const struct group *restrict " grp \
17", FILE *restrict " stream );
c7db92b9 18.fi
fea681da 19.SH DESCRIPTION
c13182ef 20The
63aa9df0 21.BR putgrent ()
61f4934a 22function is the counterpart for
fb186734 23.BR fgetgrent (3).
c9942389 24The function writes the content of the provided
1ae6b2c7 25.I struct group
c9942389 26into the
2d70fb0d 27.IR stream .
bd74a873 28The list of group members must be NULL-terminated or NULL-initialized.
51f5698d 29.PP
c9942389 30The
1ae6b2c7 31.I struct group
c9942389 32is defined as follows:
51f5698d 33.PP
a08ea57c 34.in +4n
bdd915e2 35.EX
fea681da 36struct group {
b9f02710
MK
37 char *gr_name; /* group name */
38 char *gr_passwd; /* group password */
39 gid_t gr_gid; /* group ID */
40 char **gr_mem; /* group members */
fea681da 41};
bdd915e2 42.EE
a08ea57c 43.in
47297adb 44.SH RETURN VALUE
c7094399 45The function returns zero on success, and a nonzero value on error.
45932f13
ZL
46.SH ATTRIBUTES
47For an explanation of the terms used in this section, see
48.BR attributes (7).
c466875e
MK
49.ad l
50.nh
45932f13
ZL
51.TS
52allbox;
c466875e 53lbx lb lb
45932f13
ZL
54l l l.
55Interface Attribute Value
56T{
57.BR putgrent ()
58T} Thread safety MT-Safe
59.TE
c466875e
MK
60.hy
61.ad
847e0d88 62.sp 1
3113c7f3 63.SH STANDARDS
a7fadb55 64This function is a GNU extension.
47297adb 65.SH SEE ALSO
fea681da
MK
66.BR fgetgrent (3),
67.BR getgrent (3),
0a4f8b7b 68.BR group (5)