X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=release%2Fman3%2Fgetpwnam.3;h=79ed67e0b4d7e3fd821651163859ffec5601dc17;hb=25a9ae037fb2517d0cf4e625fb5bdbc5f06e004d;hp=6b918c85794059b969c5127a4a9ab44376bb4ed1;hpb=4fa3e54b837e5814a4598ec901d77446bf5cb9b3;p=linuxjm%2FLDP_man-pages.git diff --git a/release/man3/getpwnam.3 b/release/man3/getpwnam.3 index 6b918c85..79ed67e0 100644 --- a/release/man3/getpwnam.3 +++ b/release/man3/getpwnam.3 @@ -2,6 +2,7 @@ .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" +.\" %%%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. @@ -21,6 +22,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 @@ -37,7 +39,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH GETPWNAM 3 2010\-10\-21 GNU "Linux Programmer's Manual" +.TH GETPWNAM 3 2013\-06\-21 GNU "Linux Programmer's Manual" .SH 名前 getpwnam, getpwnam_r, getpwuid, getpwuid_r \- パスワードファイルのエントリの取得 .SH 書式 @@ -102,8 +104,13 @@ struct passwd { \fI*result\fP には結果へのポインタが格納される。エントリが見つからなかった 場合やエラーが発生した場合には \fI*result\fP には NULL が入る。 .PP -\fIbuf\fP に必要な最大サイズは、 \fBsysconf\fP(3) に引き数 -\fB_SC_GETPW_R_SIZE_MAX\fP を指定して実行することで分かる。 +呼び出し + + sysconf(_SC_GETPW_R_SIZE_MAX) + +は、 \fIerrno\fP を変更せずに \-1 を返すか、 \fIbuf\fP の初期サイズの推奨値を +返す。(このサイズが小さすぎる場合、呼び出しは \fBERANGE\fP で失敗し、この +場合には呼び出し側はバッファを大きくしてから再度呼び出すことができる。) .SH 返り値 \fBgetpwnam\fP() と \fBgetpwuid\fP() 関数は、 \fIpasswd\fP 構造体へのポインタを返す。 一致するエントリが見つからなかった場合や、エラーが発生した場合は NULL を返す。 エラーが起こった場合、 \fIerrno\fP が適切に設定される。 @@ -143,6 +150,11 @@ I/O エラー。 .TP \fI/etc/passwd\fP ローカルのパスワード・データベースファイル +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBgetpwnam\fP() と \fBgetpwuid\fP() はスレッドセーフではない。 +.LP +関数 \fBgetpwnam_r\fP() と \fBgetpwuid_r\fP() はスレッドセーフである。 .SH 準拠 SVr4, 4.3BSD, POSIX.1\-2001. \fIpw_gecos\fP フィールドは POSIX では規定されていないが、 ほとんどの実装に存在する。 @@ -220,3 +232,7 @@ main(int argc, char *argv[]) .SH 関連項目 \fBendpwent\fP(3), \fBfgetpwent\fP(3), \fBgetgrnam\fP(3), \fBgetpw\fP(3), \fBgetpwent\fP(3), \fBgetspnam\fP(3), \fBputpwent\fP(3), \fBsetpwent\fP(3), \fBpasswd\fP(5) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。