From 7f3caba522f4d24764f29d83aa2de9198bb7f01c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 24 May 2024 06:52:22 +0200 Subject: Adding upstream version 6.8. Signed-off-by: Daniel Baumann --- man/man3/putgrent.3 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 man/man3/putgrent.3 (limited to 'man/man3/putgrent.3') diff --git a/man/man3/putgrent.3 b/man/man3/putgrent.3 new file mode 100644 index 0000000..6437698 --- /dev/null +++ b/man/man3/putgrent.3 @@ -0,0 +1,66 @@ +'\" t +.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH putgrent 3 2024-05-02 "Linux man-pages (unreleased)" +.SH NAME +putgrent \- write a group database entry to a file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.P +.BI "int putgrent(const struct group *restrict " grp \ +", FILE *restrict " stream ); +.fi +.SH DESCRIPTION +The +.BR putgrent () +function is the counterpart for +.BR fgetgrent (3). +The function writes the content of the provided +.I struct group +into the +.IR stream . +The list of group members must be NULL-terminated or NULL-initialized. +.P +The +.I struct group +is defined as follows: +.P +.in +4n +.EX +struct group { + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* group members */ +}; +.EE +.in +.SH RETURN VALUE +The function returns zero on success, and a nonzero value on error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.na +.nh +.BR putgrent () +T} Thread safety MT-Safe +.TE +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR fgetgrent (3), +.BR getgrent (3), +.BR group (5) -- cgit v1.2.3