OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / getgrouplist.3
index 6ec9f39..b8c4095 100644 (file)
 .\" A few pieces remain from an earlier version written in
 .\" 2002 by Walter Harms (walter.harms@informatik.uni-oldenburg.de)
 .\"
-.\" Japanese Version Copyright (c) 2004 Yuichi SATO
-.\"         all rights reserved.
-.\" Translated 2004-08-07, Yuichi SATO <ysato444@yahoo.co.jp>
-.\" Updated 2008-08-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
+.\"*******************************************************************
 .\"
-.TH GETGROUPLIST 3 2009-07-03 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH GETGROUPLIST 3 2009\-07\-03 GNU "Linux Programmer's Manual"
 .SH 名前
-.\"O getgrouplist \- get list of groups to which a user belongs
 getgrouplist \- ユーザが所属するグループのリストを取得する
-.\"O .SH SYNOPSIS
 .SH 書式
-.B #include <grp.h>
+\fB#include <grp.h>\fP
 .sp
-.BI "int getgrouplist(const char *" user ", gid_t " group ,
+\fBint getgrouplist(const char *\fP\fIuser\fP\fB, gid_t \fP\fIgroup\fP\fB,\fP
 .br
-.BI "                 gid_t *" groups ", int *" ngroups );
+\fB gid_t *\fP\fIgroups\fP\fB, int *\fP\fIngroups\fP\fB);\fP
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR getgrouplist ():
-_BSD_SOURCE
-.\"O .SH DESCRIPTION
+\fBgetgrouplist\fP(): _BSD_SOURCE
 .SH 説明
-.\"O The
-.\"O .BR getgrouplist ()
-.\"O function scans the group database (see
-.\"O .BR group (5))
-.\"O to obtain the list of groups that
-.\"O .I user
-.\"O belongs to.
-.\"O Up to
-.\"O .I *ngroups
-.\"O of these groups are returned in the array
-.\"O .IR groups .
-.BR getgrouplist ()
-関数は、グループデータベース
-.RB ( group (5)
-参照) を調べて、
-.I user
-が所属するグループのリストを取得する。
-見つかったグループのうち最大
-.I *ngroups
-個のグループが、配列
-.I groups
+\fBgetgrouplist\fP()  関数は、グループデータベース (\fBgroup\fP(5)  参照) を調べて、 \fIuser\fP
+が所属するグループのリストを取得する。 見つかったグループのうち最大 \fI*ngroups\fP 個のグループが、配列 \fIgroups\fP
 に格納されて返される。
 
-.\"O If it was not among the groups defined for
-.\"O .I user
-.\"O in the group database, then
-.\"O .I group
-.\"O is included in the list of groups returned by
-.\"O .BR getgrouplist ();
-.\"O typically this argument is specified as the group ID from
-.\"O the password record for
-.\"O .IR user .
-引き数
-.I group
-がグループデータベースに
-.I user
-が所属するグループがなかった場合、
-.BR getgrouplist ()
-が返すグループのリストに引き数
-.I group
-も追加される。
-通常は、この引き数にはユーザ
-.I user
+引き数 \fIgroup\fP がグループデータベースに \fIuser\fP が所属するグループがなかった場合、 \fBgetgrouplist\fP()
+が返すグループのリストに引き数 \fIgroup\fP も追加される。 通常は、この引き数にはユーザ \fIuser\fP
 のパスワードレコードに書かれているグループ ID を指定する。
 
-.\"O The
-.\"O .I ngroups
-.\"O argument is a value-result argument:
-.\"O on return it always contains the number of groups found for
-.\"O .IR user ,
-.\"O including
-.\"O .IR group ;
-.\"O this value may be greater than the number of groups stored in
-.\"O .IR groups .
-引き数
-.I ngroups
-は、値渡しと結果の両方に使用される引き数 (value-result argument) であり、
-リターン時には、常に
-.I group
-も含めた
-.I user
-が所属するグループ数が格納される。
-この値は
-.I groups
+引き数 \fIngroups\fP は、値渡しと結果の両方に使用される引き数 (value\-result argument) であり、 リターン時には、常に
+\fIgroup\fP も含めた \fIuser\fP が所属するグループ数が格納される。 この値は \fIgroups\fP
 に格納されたグループ数より大きくなる可能性がある。
-.\"O .SH "RETURN VALUE"
 .SH 返り値
-.\"O If the number of groups of which
-.\"O .I user
-.\"O is a member is less than or equal to
-.\"O .IR *ngroups ,
-.\"O then the value
-.\"O .I *ngroups
-.\"O is returned.
-.I user
-が所属しているグループ数が
-.I *ngroups
-以下の場合、
-.I *ngroups
-の値が返される。
+\fIuser\fP が所属しているグループ数が \fI*ngroups\fP 以下の場合、 \fI*ngroups\fP の値が返される。
 
-.\"O If the user is a member of more than
-.\"O .I *ngroups
-.\"O groups, then
-.\"O .BR getgrouplist ()
-.\"O returns \-1.
-指定されたユーザが
-.I *ngroups
-より多くのグループに所属している場合、
-.BR getgrouplist ()
-は \-1 を返す。
-.\"O In this case the value returned in
-.\"O .IR *ngroups
-.\"O can be used to resize the buffer passed to a further call
-.\"O .BR getgrouplist ().
-この場合、
-.I *ngroups
-で返される値を使って、バッファのサイズを変更してから、
-.BR getgrouplist ()
-をもう一度呼び出すことができる。
-.\"O .SH "VERSIONS"
+指定されたユーザが \fI*ngroups\fP より多くのグループに所属している場合、 \fBgetgrouplist\fP()  は \-1 を返す。 この場合、
+\fI*ngroups\fP で返される値を使って、バッファのサイズを変更してから、 \fBgetgrouplist\fP()  をもう一度呼び出すことができる。
 .SH バージョン
-.\"O This function is present since glibc 2.2.4.
 この関数は glibc 2.2.4 から存在する。
-.\"O .SH "CONFORMING TO"
 .SH 準拠
-.\"O This function is nonstandard; it appears on most BSDs.
 この関数は非標準である。ほとんどの BSD に存在する。
-.\"O .SH BUGS
 .SH バグ
-.\"O In glibc versions before 2.3.3,
-.\"O the implementation of this function contains a buffer-overrun bug:
-.\"O it returns the complete list of groups for
-.\"O .IR user
-.\"O in the array
-.\"O .IR groups ,
-.\"O even when the number of groups exceeds
-.\"O .IR *ngroups .
-バージョン 2.3.3 より前の glibc では、
-この関数の実装にはバッファオーバーフローのバグがあり、
-.I user
-が所属するグループ数が
-.I *ngroups
-より多い場合であっても、
-.I user
-が所属するグループの全リストを配列
-.I groups
-に格納してしまう。
-.\"O .SH EXAMPLE
+バージョン 2.3.3 より前の glibc では、 この関数の実装にはバッファオーバーフローのバグがあり、 \fIuser\fP が所属するグループ数が
+\fI*ngroups\fP より多い場合であっても、 \fIuser\fP が所属するグループの全リストを配列 \fIgroups\fP に格納してしまう。
 .SH 例
 .PP
-.\"O The program below displays the group list for the user named in its
-.\"O first command-line argument.
-.\"O The second command-line argument specifies the
-.\"O .I ngroups
-.\"O value to be supplied to
-.\"O .BR getgrouplist ().
-.\"O The following shell session shows examples of the use of this program:
-以下のプログラムは、一つ目のコマンドライン引き数で指定された名前のユーザ
-が所属するグループのリストを表示する。
-二番目のコマンドライン引き数には、
-.BR getgrouplist ()
-に渡す
-.I ngroups
-の値を指定する。
+以下のプログラムは、一つ目のコマンドライン引き数で指定された名前のユーザ が所属するグループのリストを表示する。 二番目のコマンドライン引き数には、
+\fBgetgrouplist\fP()  に渡す \fIngroups\fP の値を指定する。
 以下のシェルのセッションはこのプログラムの使用例を示したものである。
 .in +4n
 .nf
 
-.RB "$" " ./a.out cecilia 0"
+$\fB ./a.out cecilia 0\fP
 getgrouplist() returned \-1; ngroups = 3
-.RB "$" " ./a.out cecilia 3"
+$\fB ./a.out cecilia 3\fP
 ngroups = 3
 16 (dialout)
 33 (video)
 100 (users)
 .fi
 .in
-.\"O .SS Program source
 .SS プログラムのソース
 \&
 .nf
@@ -230,7 +102,7 @@ main(int argc, char *argv[])
     struct group *gr;
 
     if (argc != 3) {
-        fprintf(stderr, "Usage: %s <user> <ngroups>\\n", argv[0]);
+        fprintf(stderr, "Usage: %s <user> <ngroups>\en", argv[0]);
         exit(EXIT_FAILURE);
     }
 
@@ -253,29 +125,24 @@ main(int argc, char *argv[])
     /* Retrieve group list */
 
     if (getgrouplist(argv[1], pw\->pw_gid, groups, &ngroups) == \-1) {
-        fprintf(stderr, "getgrouplist() returned \-1; ngroups = %d\\n",
+        fprintf(stderr, "getgrouplist() returned \-1; ngroups = %d\en",
                 ngroups);
        exit(EXIT_FAILURE);
     }
 
     /* Display list of retrieved groups, along with group names */
 
-    fprintf(stderr, "ngroups = %d\\n", ngroups);
+    fprintf(stderr, "ngroups = %d\en", ngroups);
     for (j = 0; j < ngroups; j++) {
         printf("%d", groups[j]);
         gr = getgrgid(groups[j]);
         if (gr != NULL)
             printf(" (%s)", gr\->gr_name);
-        printf("\\n");
+        printf("\en");
     }
 
     exit(EXIT_SUCCESS);
 }
 .fi
-.\"O .SH "SEE ALSO"
 .SH 関連項目
-.BR getgroups (2),
-.BR setgroups (2),
-.BR getgrent (3),
-.BR group (5),
-.BR passwd (5)
+\fBgetgroups\fP(2), \fBsetgroups\fP(2), \fBgetgrent\fP(3), \fBgroup\fP(5), \fBpasswd\fP(5)