OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / man3 / getlogin.3
index e2b8239..91182d7 100644 (file)
@@ -1,7 +1,6 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright 1995  James R. Van Zandt <jrv@vanzandt.mv.com>
 .\"
+.\" %%%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 +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
 .\"
 .\" Changed Tue Sep 19 01:49:29 1995, aeb: moved from man2 to man3
 .\"  added ref to /etc/utmp, added BUGS section, etc.
@@ -84,7 +84,7 @@ POSIX では以下のエラーが規定されている:
 システム全体でオープンしているファイル数がすでに上限に達している。
 .TP 
 \fBENXIO\fP
-呼び出し元プロセスには制御端末がない。
+The calling process has no controlling terminal.
 .TP 
 \fBERANGE\fP
 (getlogin_r)  (終端の NULL バイトも含めた) ユーザ名の長さが \fIbufsize\fP よりも長い。
@@ -113,13 +113,14 @@ System V にも \fBcuserid\fP()  があるが、 これは実効ユーザー ID
 \fBcuserid\fP()  関数は 1988 年版の POSIX には含まれていたが、 1990 年版では削除された。 SUSv2
 に存在したが、POSIX.1\-2001 で削除された。
 .LP
-OpenBSD には \fBgetlogin\fP()  と \fBsetlogin\fP()  があり、 セッションに対応したユーザ名がある。制御端末がない
-セッションの場合であっても、対応するユーザ名がある。
+OpenBSD has \fBgetlogin\fP()  and \fBsetlogin\fP(), and a username associated with
+a session, even if it has no controlling terminal.
 .SH バグ
-残念ながら、 \fBgetlogin\fP()  をだますのはそれほど難しいことではない。別のプログラムが utmp ファイルを
-壊してしまうと、全く動作しないこともある。またログイン名の最初の 8 文字 しか返さないことも多い。またプログラムを制御している tty に
-現在ログインしているユーザーは、プログラムを実行した ユーザーでない場合もある。 セキュリティの絡む用途には \fBgetlogin\fP()
-を用いるべきではない。
+Unfortunately, it is often rather easy to fool \fBgetlogin\fP().  Sometimes it
+does not work at all, because some program messed up the utmp file.  Often,
+it gives only the first 8 characters of the login name.  The user currently
+logged in on the controlling terminal of our program need not be the user
+who started it.  Avoid \fBgetlogin\fP()  for security\-related purposes.
 .LP
 glibc は POSIX 仕様には従っておらず、 \fI/dev/tty\fP ではなく \fI標準入力 (stdin)\fP を使う。これはバグである。
 (SunOS 5.8 や HP\-UX 11.11 や FreeBSD 4.8 といった他の最近のシステムはいずれも、 \fI標準入力\fP
@@ -131,6 +132,6 @@ glibc は POSIX 仕様には従っておらず、 \fI/dev/tty\fP ではなく \f
 .SH 関連項目
 \fBgeteuid\fP(2), \fBgetuid\fP(2), \fButmp\fP(5)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。