OSDN Git Service

Update release for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man2 / execve.2
index bcfda1e..22fa794 100644 (file)
@@ -58,7 +58,7 @@
 .\" Updated 2013-03-22, Akihiro MOTOKI, LDP v3.50
 .\" Updated 2013-07-22, Akihiro MOTOKI, LDP v3.52
 .\"
-.TH EXECVE 2 2014\-01\-08 Linux "Linux Programmer's Manual"
+.TH EXECVE 2 2014\-05\-10 Linux "Linux Programmer's Manual"
 .SH 名前
 execve \- プログラムを実行する
 .SH 書式
@@ -84,7 +84,7 @@ execve \- プログラムを実行する
 ファイル名を含めることになっている。
 \fIenvp\fP は文字列の配列であり、伝統的に \fBkey=value\fP の形式をしており、
 新しいプログラムの環境変数として渡される。
-\fIargv\fP と \fIenvp\fP はいずれもの NULL ポインタで終わっている必要がある。
+\fIargv\fP と \fIenvp\fP はいずれものヌルポインタで終わっている必要がある。
 引き数配列と環境変数は、呼び出されたプログラムの main 関数を
 以下のように定義することによってアクセス可能になる。
 
@@ -127,7 +127,7 @@ PT_INTERP セグメントに指定されたインタプリタが必要な 共有
 .IP *
 メモリマッピングは保持されない (\fBmmap\fP(2))。
 .IP *
-付加された (attached) System V 共有メモリセグメントは分離される (\fBshmat\fP(2))。
+付加された (attached) System\ V 共有メモリセグメントは分離される (\fBshmat\fP(2))。
 .IP *
 POSIX 共有メモリ領域はマッピングを解除される (\fBshm_open\fP(3))。
 .IP *
@@ -315,14 +315,35 @@ SVr4, 4.3BSD, POSIX.1\-2001.  POSIX.1\-2001 には #! 動作についての記
 .SH 注意
 set\-user\-id プロセスと set\-group\-ID プロセスは \fBptrace\fP(2)  できない。
 
-Linux はスクリプトの set\-user\-ID と set\-group\-ID ビットを無視する。
+.\" e.g., EFAULT on Solaris 8 and FreeBSD 6.1; but
+.\" HP-UX 11 is like Linux -- mtk, Apr 2007
+.\" Bug filed 30 Apr 2007: http://bugzilla.kernel.org/show_bug.cgi?id=8408
+.\" Bug rejected (because fix would constitute an ABI change).
+.\"
+The result of mounting a filesystem \fInosuid\fP varies across Linux kernel
+versions: some will refuse execution of set\-user\-ID and set\-group\-ID
+executables when this would give the user powers she did not have already
+(and return \fBEPERM\fP), some will just ignore the set\-user\-ID and
+set\-group\-ID bits and \fBexec\fP()  successfully.  On Linux, \fIargv\fP and
+\fIenvp\fP can be specified as NULL.  In both cases, this has the same effect
+as specifying the argument as a pointer to a list containing a single null
+pointer.  \fBDo not take advantage of this misfeature!\fP It is nonstandard and
+nonportable: on most other UNIX systems doing this will result in an error
+(\fBEFAULT\fP).
 
-ファイルシステムを \fInosuid\fP でマウントした場合に set\-user\-ID/set\-group\-ID の実行ファイルを
-どの様に扱うかは、Linux カーネルのバージョンによって異なる: あるバージョンでは、すでに必要な権限を持っている場合を除いて、 その実行を拒否する
-(そして \fBEPERM\fP を返す)。別のあるバージョンでは set\-user\-ID/set\-group\-ID ビットのみを無視し \fBexec\fP()
-は成功する。
+POSIX.1\-2001 は、 \fBsysconf\fP(3)  が返す値はプロセスの生存中は変化しないべきだとしている。 しかしながら、Linux
+2.6.23 以降では、リソース上限 \fBRLIMIT_STACK\fP が変化した場合、 コマンドライン引き数と環境変数を保持するための空間に対する上限が
+変化したことを反映して、 \fB_SC_ARG_MAX\fP が返す値も変化する。
 
-#! 実行形式のシェルスクリプトの 1行目に許されている文字数は、 最大 127 文字である。
+.\"
+In most cases where \fBexecve\fP()  fails, control returns to the original
+executable image, and the caller of \fBexecve\fP()  can then handle the error.
+However, in (rare) cases (typically caused by resource exhaustion), failure
+may occur past the point of no return: the original executable image has
+been torn down, but the new image could not be completely built.  In such
+cases, the kernel kills the process with a \fBSIGKILL\fP signal.
+.SS インタプリタ・スクリプト
+インタプリタスクリプトの 1行目に許されている文字数は、 最大 127 文字である。
 
 .\" e.g., Solaris 8
 .\" e.g., FreeBSD before 6.0, but not FreeBSD 6.0 onward
@@ -331,15 +352,9 @@ Linux はスクリプトの set\-user\-ID と set\-group\-ID ビットを無視
 \fIoptional\-arg\fP のうち最初のホワイトスペースまでが 引き数として渡される。 また、別のシステムでは
 インタプリタ・スクリプトは複数の引き数を持つことができ、 \fIoptional\-arg\fP 内のホワイトスペースが引き数の区切りとなる。
 
-.\" e.g., EFAULT on Solaris 8 and FreeBSD 6.1; but
-.\" HP-UX 11 is like Linux -- mtk, Apr 2007
-.\" Bug filed 30 Apr 2007: http://bugzilla.kernel.org/show_bug.cgi?id=8408
-.\" Bug rejected (because fix would constitute an ABI change).
 .\"
-Linux では、 \fIargv\fP と \fIenvp\fP のいずれかには NULL を指定することができる。これは、これらの引き数に NULL ポインタ
-1個だけを含むリストへのポインタを指定したのと同じ効果を持つ。 \fB「この間違った機能を利用しないこと」\fP。 これは非標準で、移植性もない。
-他のほとんどの UNIX システムでは、これを行うとエラー (\fBEFAULT\fP)  になる。
-
+Linux はスクリプトの set\-user\-ID と set\-group\-ID ビットを無視する。
+.SS 歴史
 .\"
 .\" .SH BUGS
 .\" Some Linux versions have failed to check permissions on ELF
@@ -349,16 +364,11 @@ Linux では、 \fIargv\fP と \fIenvp\fP のいずれかには NULL を指定
 .\" .BR execve ()
 .\" that could be exploited for denial of service by a suitably crafted
 .\" ELF binary. There are no known problems with 2.0.34 or 2.2.15.
-POSIX.1\-2001 は、 \fBsysconf\fP(3)  が返す値はプロセスの生存中は変化しないべきだとしている。 しかしながら、Linux
-2.6.23 以降では、リソース上限 \fBRLIMIT_STACK\fP が変化した場合、 コマンドライン引き数と環境変数を保持するための空間に対する上限が
-変化したことを反映して、 \fB_SC_ARG_MAX\fP が返す値も変化する。
-.SS 歴史
-UNIX V6 では \fBexec\fP()  コールの引き数リストは 0 で終端され、 \fImain\fP の引き数リストは \-1 で終端されていた。
-そのため、 \fImain\fP の引き数リストは、その後の \fBexec\fP()  コールには直接使用できなかった。 UNIX V7 以降では、ともに
+UNIX\ V6 では \fBexec\fP()  コールの引き数リストは 0 で終端され、 \fImain\fP の引き数リストは \-1 で終端されていた。
+そのため、 \fImain\fP の引き数リストは、その後の \fBexec\fP()  コールには直接使用できなかった。 UNIX\ V7 以降では、ともに
 NULL で終端される。
 .SH 例
-The following program is designed to be execed by the second program below.
-It just echoes its command\-line arguments, one per line.
+このプログラムは、以下の二つ目のプログラムから実行するためのものである。 コマンドライン引き数を 1行に 1個ずつ表示するだけのプログラムである。
 
 .in +4n
 .nf
@@ -452,6 +462,6 @@ argv[4]: world
 \fBgetopt\fP(3), \fBcredentials\fP(7), \fBenviron\fP(7), \fBpath_resolution\fP(7),
 \fBld.so\fP(8)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。