]>
Commit | Line | Data |
---|---|---|
1 | .\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de) | |
2 | .\" Distributed under GPL | |
3 | .\" | |
4 | .TH PUTGRENT 3 2003-09-09 "GNU" "Linux Programmer's Manual" | |
5 | .SH NAME | |
6 | putgrent \- 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 | .SH DESCRIPTION | |
14 | The | |
15 | .BR putgrent () | |
16 | function is the counterpart for | |
17 | .BR fgetgrent (3). | |
18 | The function writes the content of the provided \fIstruct group\fP into the | |
19 | file pointed to by | |
20 | .IR fp . | |
21 | The list of group members must be NULL terminated or NULL initialized. | |
22 | .sp | |
23 | The \fIstruct group\fP is defined as follows: | |
24 | .sp | |
25 | .in +0.5i | |
26 | .nf | |
27 | struct group { | |
28 | char *gr_name; /* group name */ | |
29 | char *gr_passwd; /* group password */ | |
30 | gid_t gr_gid; /* group ID */ | |
31 | char **gr_mem; /* group members */ | |
32 | }; | |
33 | .fi | |
34 | .in -0.5i | |
35 | .SH "RETURN VALUE" | |
36 | The function returns zero on success, and a non-zero value on error. | |
37 | .SH "CONFORMING TO" | |
38 | This function is a GNU extension. | |
39 | .SH "SEE ALSO" | |
40 | .BR fgetgrent (3), | |
41 | .BR getgrent (3), | |
42 | .BR group (5), | |
43 | .BR feature_test_macros (7) |