OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / draft / man2 / getgroups.2
diff --git a/draft/man2/getgroups.2 b/draft/man2/getgroups.2
deleted file mode 100644 (file)
index df99d99..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
-.\"
-.\" %%%LICENSE_START(VERBATIM)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
-.\" Modified Thu Oct 31 12:04:29 1996 by Eric S. Raymond <esr@thyrsus.com>
-.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
-.\"     Added notes on capability requirements
-.\" 2008-05-03, mtk, expanded and rewrote parts of DESCRIPTION and RETURN
-.\"     VALUE, made style of page more consistent with man-pages style.
-.\"
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
-.\"         all rights reserved.
-.\" Translated 1997-02-22, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated 2001-02-10, Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
-.\" Updated & Modified 2004-12-30, Yuichi SATO <ysato444@yahoo.co.jp>
-.\" Updated 2008-08-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
-.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
-.\"
-.TH GETGROUPS 2 2014\-08\-19 Linux "Linux Programmer's Manual"
-.SH 名前
-getgroups, setgroups \- 補助グループ ID のリストを取得/設定する
-.SH 書式
-\fB#include <sys/types.h>\fP
-.br
-\fB#include <unistd.h>\fP
-.sp
-\fBint getgroups(int \fP\fIsize\fP\fB, gid_t \fP\fIlist\fP\fB[]);\fP
-.sp
-\fB#include <grp.h>\fP
-.sp
-\fBint setgroups(size_t \fP\fIsize\fP\fB, const gid_t *\fP\fIlist\fP\fB);\fP
-.sp
-.in -4n
-glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
-.in
-.sp
-\fBsetgroups\fP(): _BSD_SOURCE
-.SH 説明
-.PP
-\fBgetgroups\fP()  は呼び出し元プロセスの補助グループ (supplementary group) ID を \fIlist\fP に返す。
-\fIsize\fP 引き数には、 \fIlist\fP により参照されるバッファーに格納できる要素の最大数を設定すべきである。 呼び出し元プロセスが
-\fIsize\fP 個より多くの補助グループのメンバの場合には、エラーとなる。 この関数を呼び出したプロセスの実効グループ ID が、
-返されるリストに含まれるかどうかは規定されていない (したがって、アプリケーションは \fBgetegid\fP(2)
-を呼び出し、その結果の値を追加・削除すべきである)。
-
-\fIsize\fP が 0 ならば、 \fIlist\fP は修正されないが、そのプロセスの補助グループ ID の合計数が返される。 これを使うことで、それ以降の
-\fBgetgroups\fP()  の呼び出しで必要となる動的割り当てバッファー \fIlist\fP のサイズを、呼び出し元が決定することができる。
-.PP
-\fBsetgroups\fP()  は、呼び出し元プロセスの補助グループ ID を設定する。 適切な特権 (Linux では \fBCAP_SETGID\fP
-ケーパビリティ (capability)) が必要である。 \fIsize\fP 引き数には、 \fIlist\fP
-により参照されるバッファーに格納された補助グループ ID の数を指定する。
-.SH 返り値
-\fBgetgroups\fP()  は、成功すると補助グループ ID の数を返す。 エラーの場合 \-1 を返し、 \fIerrno\fP を適切に設定する。
-
-\fBsetgroups\fP()  は、成功すると 0 を返す。 エラーの場合 \-1 を返し、 \fIerrno\fP を適切に設定する。
-.SH エラー
-.TP 
-\fBEFAULT\fP
-\fIlist\fP が不正なアドレスである。
-.PP
-\fBgetgroups\fP()  は、上記に加えて以下のエラーで失敗する可能性がある。
-.TP 
-\fBEINVAL\fP
-\fIsize\fP が補助グループ ID の数より小さいが 0 でない。
-.PP
-\fBsetgroups\fP()  は、上記に加えて以下のエラーで失敗する可能性がある。
-.TP 
-\fBEINVAL\fP
-\fIsize\fP が \fBNGROUPS_MAX\fP より大きい (\fBNGROUPS_MAX\fP は Linux 2.6.4 より前では 32、Linux
-2.6.4 以降では 65536)。
-.TP 
-\fBENOMEM\fP
-メモリー不足。
-.TP 
-\fBEPERM\fP
-呼び出し元プロセスが十分な特権を持っていない。
-.SH 準拠
-SVr4, 4.3BSD.  \fBgetgroups\fP()  関数は POSIX.1\-2001 に準拠している。 \fBsetgroups\fP()
-は特権を必要とするため、POSIX.1\-2001 に従っていない。
-.SH 注意
-プロセスは、実効グループ ID に加え、最大 \fBNGROUPS_MAX\fP までの補助グループ ID を持つことができる。 定数
-\fBNGROUPS_MAX\fP は \fI<limits.h>\fP で定義されている。 補助グループ ID の集合は親プロセスから継承され、
-\fBexecve\fP(2)  の前後で保持される。
-
-補助グループ ID の最大数は、実行時に \fBsysconf\fP(3)  を使って以下のようにして調べることができる:
-.nf
-
-    long ngroups_max;
-    ngroups_max = sysconf(_SC_NGROUPS_MAX);
-
-.fi
-\fBgetgroups\fP() の返り値の最大値は、この値より大きくなることはない。 Linux 2.6.4 以降では、補助グループ ID の最大数も
-Linux 固有の読み込み専用のファイル \fI/proc/sys/kernel/ngroups_max\fP 経由で公開されている。
-
-元々の Linux の \fBgetgroups\fP() システムコールは 16 ビットのグループ ID だけ
-に対応していた。その後、Linux 2.4 で、32 ビットの ID に対応した
-\fBgetgroups\fP() が追加された。glibc の \fBgetgroups\fP のラッパー関数はカーネル
-バージョンによるこの違いを吸収している。
-.SH 関連項目
-\fBgetgid\fP(2), \fBsetgid\fP(2), \fBgetgrouplist\fP(3), \fBgroup_member\fP(3),
-\fBinitgroups\fP(3), \fBcapabilities\fP(7), \fBcredentials\fP(7)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。