1 .\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .TH putgrent 3 (date) "Linux man-pages (unreleased)"
7 putgrent \- write a group database entry to a file
10 .RI ( libc ", " \-lc )
13 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
16 .BI "int putgrent(const struct group *restrict " grp \
17 ", FILE *restrict " stream );
22 function is the counterpart for
24 The function writes the content of the provided
28 The list of group members must be NULL-terminated or NULL-initialized.
32 is defined as follows:
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 */
45 The function returns zero on success, and a nonzero value on error.
47 For an explanation of the terms used in this section, see
55 Interface Attribute Value
58 T} Thread safety MT-Safe
64 This function is a GNU extension.