putgrentのヘルプ・マニュアル
日本語 英語
putgrent --help
man putgrent
PUTGRENT(3) Linux Programmer’s Manual PUTGRENT(3)
名前
putgrent - グループデータベースエントリをファイルに書き込む
書式
#define _GNU_SOURCE
#include
int putgrent(const struct group *grp, FILE *fp);
説明
putgrent() 関数は fgetgrent(3) の逆である。この関数は与えられた struct
group を fp で指されるファイルに書き込む。グループメンバ の リ ス ト は
、NULL で終端されるか、 NULL で初期化されなければならない。
struct group は以下のように定義される:
struct group {
char *gr_name; /* グループ名 */
char *gr_passwd; /* グループパスワード */
gid_t gr_gid; /* グループ ID */
char **gr_mem; /* グループメンバ */
};
返り値
この関数は、成功した場合は 0 を返し、エラーの場合は 0 以外の値を返す。
準拠
この関数は GNU による拡張である。
関連項目
fgetgrent(3), getgrent(3), group(5), feature_test_macros(7)
GNU 2003-09-09 PUTGRENT(3)
PUTGRENT(3) Linux Programmer’s Manual PUTGRENT(3)
NAME
putgrent - write a group database entry to a file
SYNOPSIS
#define _GNU_SOURCE
#include
int putgrent(const struct group *grp, FILE *fp);
DESCRIPTION
The putgrent() function is the counterpart for fgetgrent(3). The func-
tion writes the content of the provided struct group into the file
pointed to by fp. The list of group members must be NULL terminated or
NULL initialized.
The struct group is defined as follows:
struct group {
char *gr_name; /* group name */
char *gr_passwd; /* group password */
gid_t gr_gid; /* group ID */
char **gr_mem; /* group members */
};
RETURN VALUE
The function returns zero on success, and a non-zero value on error.
CONFORMING TO
This function is a GNU extension.
SEE ALSO
fgetgrent(3), getgrent(3), group(5), feature_test_macros(7)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2003-09-09 PUTGRENT(3)