1 .\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
7 .TH PUTGRENT 3 2021-03-22 "GNU" "Linux Programmer's Manual"
9 putgrent \- write a group database entry to a file
12 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
15 .BI "int putgrent(const struct group *restrict " grp \
16 ", FILE *restrict " stream );
21 function is the counterpart for
23 The function writes the content of the provided
27 The list of group members must be NULL-terminated or NULL-initialized.
31 is defined as follows:
36 char *gr_name; /* group name */
37 char *gr_passwd; /* group password */
38 gid_t gr_gid; /* group ID */
39 char **gr_mem; /* group members */
44 The function returns zero on success, and a nonzero value on error.
46 For an explanation of the terms used in this section, see
54 Interface Attribute Value
57 T} Thread safety MT-Safe
63 This function is a GNU extension.