OSDN Git Service

(split) LDP: Update releases based on LDP 3.52 release
[linuxjm/LDP_man-pages.git] / release / man3 / getpwent.3
index 6854ba1..2878be6 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
 .\"
+.\" %%%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.
@@ -7,7 +8,7 @@
 .\" 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
+.\" 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
@@ -19,6 +20,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     Linux libc source code
 .\" Modified Sat Jul 24 19:22:14 1993 by Rik Faith (faith@cs.unc.edu)
 .\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
 .\"
-.\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
-.\"    all rights reserved.
-.\" Translated 1997-12-18, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
-.\" Updated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"*******************************************************************
 .\"
-.TH GETPWENT 3  2010-09-20 "GNU" "Linux Programmer's Manual"
-.SH Ì¾Á°
-getpwent, setpwent, endpwent \- ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥È¥ê¤Î¼èÆÀ
-.SH ½ñ¼°
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH GETPWENT 3 2013\-06\-21 GNU "Linux Programmer's Manual"
+.SH 名前
+getpwent, setpwent, endpwent \- パスワードファイルのエントリの取得
+.SH 書式
 .nf
-.B #include <sys/types.h>
-.B #include <pwd.h>
+\fB#include <sys/types.h>\fP
+\fB#include <pwd.h>\fP
 .sp
-.B struct passwd *getpwent(void);
+\fBstruct passwd *getpwent(void);\fP
 .sp
-.B void setpwent(void);
+\fBvoid setpwent(void);\fP
 .sp
-.B void endpwent(void);
+\fBvoid endpwent(void);\fP
 .fi
 .sp
 .in -4n
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
 .ad l
-.BR getpwent (),
-.BR setpwent (),
-.BR endpwent ():
+\fBgetpwent\fP(), \fBsetpwent\fP(), \fBendpwent\fP():
 .RS 4
-_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
-_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
 .RE
 .ad b
-.SH ÀâÌÀ
-.BR getpwent ()
-´Ø¿ô¤Ï¡¢¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¼èÆÀ¤·¤¿¥¨¥ó¥È¥ê¤ò
-Í×ÁÇËè¤Ëʬ²ò¤·¡¢³ÆÍ×ÁǤò³ÊǼ¤·¤¿¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹
-(¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÎã:
-¥í¡¼¥«¥ë¤Î¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë
-.IR /etc/passwd ,
-NIS, LDAP)¡£
-.BR getpwent ()
-¤Ï¡¢ºÇ½é¤Ë¸Æ¤Ó½Ð¤µ¤ì¤¿»þ¤ÏºÇ½é¤Î¥¨¥ó¥È¥ê¤òÊÖ¤·¡¢¤½¤ì°Ê¹ß¤Ï
-¸Æ¤Ó½Ð¤µ¤ì¤ëËè¤Ë¼¡¤Î¥¨¥ó¥È¥ê¤òÊÖ¤¹¡£
+.SH 説明
+\fBgetpwent\fP()  関数は、パスワード・データベースから取得したエントリを 要素毎に分解し、各要素を格納した構造体へのポインタを返す
+(パスワード・データベースの例: ローカルのパスワードファイル \fI/etc/passwd\fP, NIS, LDAP)。 \fBgetpwent\fP()
+は、最初に呼び出された時は最初のエントリを返し、それ以降は 呼び出される毎に次のエントリを返す。
 .PP
-.BR setpwent ()
-´Ø¿ô¤ò»È¤¦¤È¡¢¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÀèƬ¤ËÌá¤ë¡£
+\fBsetpwent\fP()  関数を使うと、パスワード・データベースの先頭に戻る。
 .PP
-.BR endpwent ()
-´Ø¿ô¤Ï¡¢Á´¤Æ¤Î½èÍý¤¬½ª¤ï¤Ã¤¿¸å¤Ë¥Ñ¥¹¥ï¡¼¥É¡¦
-¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥¯¥í¡¼¥º¤¹¤ë¡£
+\fBendpwent\fP()  関数は、全ての処理が終わった後にパスワード・ データベースをクローズする。
 .PP
-\fIpasswd\fP ¹½Â¤ÂΤϠ\fI<pwd.h>\fP ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
+\fIpasswd\fP 構造体は、\fI<pwd.h>\fP で以下のように定義されている:
 .sp
 .in +4n
 .nf
 struct passwd {
-    char   *pw_passwd;     /* ¥æ¡¼¥¶¤Î¥Ñ¥¹¥ï¡¼¥É */
-    uid_t   pw_uid;        /* ¥æ¡¼¥¶ ID */
-    gid_t   pw_gid;        /* ¥°¥ë¡¼¥× ID */
-    char   *pw_gecos;      /* ¼Â̾ */
-    char   *pw_dir;        /* ¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê */
-    char   *pw_shell;      /* ¥·¥§¥ë¥×¥í¥°¥é¥à */
+    char   *pw_name;       /* ユーザ名 */
+    char   *pw_passwd;     /* ユーザのパスワード */
+    uid_t   pw_uid;        /* ユーザ ID */
+    gid_t   pw_gid;        /* グループ ID */
+    char   *pw_gecos;      /* ユーザ情報 */
+    char   *pw_dir;        /* ホームディレクトリ */
+    char   *pw_shell;      /* シェルプログラム */
 };
 .fi
 .in
-.SH ÊÖ¤êÃÍ
-.BR getpwent ()
-´Ø¿ô¤Ï
-.I passwd
-¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
-¤³¤ì°Ê¾å¥¨¥ó¥È¥ê¤¬Ìµ¤¤¤«¡¢¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï NULL ¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¤È¡¢
-.I errno
-¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
-¤³¤Î´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¸å¤Ë
-.I errno
-¤ò¥Á¥§¥Ã¥¯¤·¤¿¤¤¾ì¹ç¤Ï¡¢¸Æ¤Ó½Ð¤·Á°¤Ë
-.I errno
-¤ò 0 ¤ËÀßÄꤷ¤Æ¤ª¤«¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£
+.PP
+この構造体のフィールドの詳細は \fBpasswd\fP(5)  を参照のこと。
+.SH 返り値
+\fBgetpwent\fP()  関数は \fIpasswd\fP 構造体へのポインタを返す。 これ以上エントリが無いか、エラーが発生した場合は NULL
+を返す。 エラーが発生すると、 \fIerrno\fP が適切に設定される。 この関数の呼び出し後に \fIerrno\fP をチェックしたい場合は、呼び出し前に
+\fIerrno\fP を 0 に設定しておかないといけない。
 
-ÊÖ¤êÃͤÏÀÅŪ¤ÊÎΰè¤ò»Ø¤·¤Æ¤ª¤ê¡¢¤½¤Î¸å¤Î
-.BR getpwent (),
-.BR getpwnam (3),
-.BR getpwuid (3)
-¤Î¸Æ¤Ó½Ð¤·¤Ç¾å½ñ¤­¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-(ÊÖ¤µ¤ì¤¿¥Ý¥¤¥ó¥¿¤ò
-.BR free (3)
-¤ËÅϤµ¤Ê¤¤¤³¤È¡£)
-.SH ¥¨¥é¡¼
-.TP
-.B EINTR
-¥·¥°¥Ê¥ë¤¬Ê᪤µ¤ì¤¿¡£
-.TP
-.B EIO
-Æþ½ÐÎÏ¥¨¥é¡¼¡£
-.TP
-.B EMFILE
-¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤¬¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¿ô¤¬
-¤¹¤Ç¤Ë¾å¸Â
-.RB ( OPEN_MAX )
-¤Ç¤¢¤Ã¤¿¡£
-.TP
-.B ENFILE
-¥·¥¹¥Æ¥à¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¿ô¤¬¤¹¤Ç¤Ë¾å¸Â¤Ç¤¢¤Ã¤¿¡£
-.TP
-.B ENOMEM
-.\" POSIX ¤Ë¤Ï¤Ê¤¤¡£
-.I passwd
-¹½Â¤ÂΤ˳ä¤êÅö¤Æ¤ë¥á¥â¥ê¤¬½½Ê¬¤Ê¤«¤Ã¤¿¡£
-.TP
-.B ERANGE
-½½Ê¬¤Ê¥Ð¥Ã¥Õ¥¡¶õ´Ö¤¬¤Ê¤¤¡£
-.SH ¥Õ¥¡¥¤¥ë
-.TP
-.I /etc/passwd
-¥í¡¼¥«¥ë¤Î¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë
-.SH ½àµò
-SVr4, 4.3BSD, POSIX.1-2001.
-.SH ´ØÏ¢¹àÌÜ
-.BR fgetpwent (3),
-.BR getpw (3),
-.BR getpwent_r (3),
-.BR getpwnam (3),
-.BR getpwuid (3),
-.BR putpwent (3),
-.BR passwd (5)
+返り値は静的な領域を指しており、その後の \fBgetpwent\fP(), \fBgetpwnam\fP(3), \fBgetpwuid\fP(3)
+の呼び出しで上書きされるかもしれない。 (返されたポインタを \fBfree\fP(3)  に渡さないこと。)
+.SH エラー
+.TP 
+\fBEINTR\fP
+シグナルが捕捉された。
+.TP 
+\fBEIO\fP
+I/O エラー。
+.TP 
+\fBEMFILE\fP
+呼び出し元プロセスがオープンしているファイル数が すでに上限 (\fBOPEN_MAX\fP)  であった。
+.TP 
+\fBENFILE\fP
+システムでオープンされているファイル数がすでに上限であった。
+.TP 
+\fBENOMEM\fP
+.\" not in POSIX
+.\" to allocate the passwd structure, or to allocate buffers
+\fIpasswd\fP 構造体に割り当てるメモリが十分なかった。
+.TP 
+\fBERANGE\fP
+与えられたバッファ空間が不十分である。
+.SH ファイル
+.TP 
+\fI/etc/passwd\fP
+ローカルのパスワード・データベースファイル
+.SH ATTRIBUTES
+.SS "Multithreading (see pthreads(7))"
+The \fBgetpwent()\fP function is not thread\-safe.
+.LP
+The \fBsetpwent()\fP and \fBendpwent()\fP functions are thread\-safe.
+.SH 準拠
+SVr4, 4.3BSD, POSIX.1\-2001.  \fIpw_gecos\fP フィールドは POSIX では規定されていないが、
+ほとんどの実装に存在する。
+.SH 関連項目
+\fBfgetpwent\fP(3), \fBgetpw\fP(3), \fBgetpwent_r\fP(3), \fBgetpwnam\fP(3),
+\fBgetpwuid\fP(3), \fBputpwent\fP(3), \fBpasswd\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。