]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 2 | .\" |
38f20bb9 | 3 | .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) |
fea681da | 4 | .\" Distributed under GPL |
38f20bb9 | 5 | .\" %%%LICENSE_END |
fea681da | 6 | .\" |
4b8c67d9 | 7 | .TH PUTGRENT 3 2017-09-15 "GNU" "Linux Programmer's Manual" |
fea681da MK |
8 | .SH NAME |
9 | putgrent \- write a group database entry to a file | |
10 | .SH SYNOPSIS | |
b80f966b | 11 | .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" |
fea681da MK |
12 | .br |
13 | .B #include <grp.h> | |
68e4db0a | 14 | .PP |
2d70fb0d | 15 | .BI "int putgrent(const struct group *" grp ", FILE *" stream ); |
fea681da | 16 | .SH DESCRIPTION |
c13182ef | 17 | The |
63aa9df0 | 18 | .BR putgrent () |
61f4934a | 19 | function is the counterpart for |
fb186734 | 20 | .BR fgetgrent (3). |
c9942389 MK |
21 | The function writes the content of the provided |
22 | .IR "struct group" | |
23 | into the | |
2d70fb0d | 24 | .IR stream . |
bd74a873 | 25 | The list of group members must be NULL-terminated or NULL-initialized. |
51f5698d | 26 | .PP |
c9942389 MK |
27 | The |
28 | .IR "struct group" | |
29 | is defined as follows: | |
51f5698d | 30 | .PP |
a08ea57c | 31 | .in +4n |
bdd915e2 | 32 | .EX |
fea681da | 33 | struct group { |
b9f02710 MK |
34 | char *gr_name; /* group name */ |
35 | char *gr_passwd; /* group password */ | |
36 | gid_t gr_gid; /* group ID */ | |
37 | char **gr_mem; /* group members */ | |
fea681da | 38 | }; |
bdd915e2 | 39 | .EE |
a08ea57c | 40 | .in |
47297adb | 41 | .SH RETURN VALUE |
c7094399 | 42 | The function returns zero on success, and a nonzero value on error. |
45932f13 ZL |
43 | .SH ATTRIBUTES |
44 | For an explanation of the terms used in this section, see | |
45 | .BR attributes (7). | |
46 | .TS | |
47 | allbox; | |
48 | lb lb lb | |
49 | l l l. | |
50 | Interface Attribute Value | |
51 | T{ | |
52 | .BR putgrent () | |
53 | T} Thread safety MT-Safe | |
54 | .TE | |
847e0d88 | 55 | .sp 1 |
47297adb | 56 | .SH CONFORMING TO |
a7fadb55 | 57 | This function is a GNU extension. |
47297adb | 58 | .SH SEE ALSO |
fea681da MK |
59 | .BR fgetgrent (3), |
60 | .BR getgrent (3), | |
0a4f8b7b | 61 | .BR group (5) |