\fBexecve\fP(2) を通じて渡すことができるケーパビリティの集合であり、 「許可ケーパビリティ (permitted capability)
の集合」は 実効ケーパビリティや継承可能ケーパビリティとして有効にできる ケーパビリティを規定するものである。
.PP
-These two system calls are the raw kernel interface for getting and setting
-thread capabilities. Not only are these system calls specific to Linux, but
-the kernel API is likely to change and use of these system calls (in
-particular the format of the \fIcap_user_*_t\fP types) is subject to extension
-with each kernel revision, but old programs will keep working.
+この二つのシステムコールはスレッドのケーパビリティを取得したり設定したりするための 生のカーネルインターフェースである。 これらのシステムコールは
+Linux 特有であるというだけでなく、 カーネル API は変更されるかもしれず、これらのシステムコールの使用法 (特に
+\fIcap_user_*_t\fP 型という書式) はカーネルのリビジョン毎に拡張されるかもしれないが、 以前のプログラムはそのまま動作する。
.sp
移植性のあるインターフェースは \fBcap_set_proc\fP(3) と \fBcap_get_proc\fP(3) である。
可能ならばアプリケーションはこれらの関数を使用すべきである。 アプリケーションに Linux 拡張を使用したい場合には、より簡単に
.fi
.in -4n
.sp
-The \fIeffective\fP, \fIpermitted\fP, and \fIinheritable\fP fields are bit masks of
-the capabilities defined in \fIcapability(7).\fP Note the \fBCAP_*\fP values are
-bit indexes and need to be bit\-shifted before ORing into the bit fields. To
-define the structures for passing to the system call you have to use the
-\fIstruct __user_cap_header_struct\fP and \fIstruct __user_cap_data_struct\fP
-names because the typedefs are only pointers.
+フィールド \fIeffective\fP, \fIpermitted\fP, \fIinheritable\fP は、 \fBcapability\fP(7)
+で定義されるケーパビリティのビットマスクである。 \fICAP_*\fP はビット番号を表すインデックス値であり、 ビットフィールドに OR を行う前に
+\fICAP_*\fP の値の分だけビットシフトを行う必要がある。 typedef の方はポインタなので、 このシステムコールに渡す構造体を定義するには、
+\fIstruct __user_cap_header_struct\fP と \fIstruct __user_cap_data_struct\fP
+という名前を使用しなければならない。
カーネル 2.6.25 より前では、バージョン \fB_LINUX_CAPABILITY_VERSION_1\fP の 32
ビットケーパビリティが推奨である。 カーネル 2.6.25 以降では、バージョン \fB_LINUX_CAPABILITY_VERSION_2\fP の 64
.sp
\fBcapget\fP() では、 \fIhdrp\->pid\fP のフィールド値にケーパビリティを知りたいプロセスのプロセス ID を
指定することで、任意のプロセスのケーパビリティを調べることができる。
-.SS "With VFS capability support"
+.SS "VFS ケーパビリティがサポートされている場合"
VFS ケーパビリティのサポートでは、特権実行ファイルにケーパビリティを 追加するためのファイル属性メソッドが作成された。
この特権モデルの導入により、あるプロセスにより別のプロセスのケーパビリティ を非同期に設定する機能のカーネルによるサポートは廃止される。 つまり、VFS
サポートでは、 \fBcapset\fP() を呼び出す際に \fIhdrp\->pid\fP の値として許されるのは 0 と \fBgetpid\fP(2)
が返す値だけとなる (どちらの値でも等価である)。
-.SS "Without VFS capability support"
+.SS "VFS ケーパビリティがサポートされていない場合"
カーネルが VFS ケーパビリティをサポートしていない場合、 \fIhdrp\fP の \fIpid\fP フィールドが 0 以外であれば、 \fBcapset\fP()
の操作対象は \fIpid\fP で指定されたスレッドのケーパビリティになる。 \fIpid\fP が 0
の場合は呼び出し元のスレッドのケーパビリティが操作対象となる。 \fIpid\fP がシングルスレッド・プロセスを参照している場合、 \fIpid\fP