X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=draft%2Fman2%2Fcapget.2;h=47ccdd1af0f871a37c9370749b397a49f39b6aba;hp=c417faeaacb7a59b38853519c56ac9fd2336d1a2;hb=d2ef53db26313f7ff3780ba9e181109f37f04780;hpb=c7e9fcf11b8b649e4a3368b62655604a9e23d9dd diff --git a/draft/man2/capget.2 b/draft/man2/capget.2 index c417faea..47ccdd1a 100644 --- a/draft/man2/capget.2 +++ b/draft/man2/capget.2 @@ -76,12 +76,11 @@ typedef struct __user_cap_data_struct { .fi .in -4n .sp -The \fIeffective\fP, \fIpermitted\fP, and \fIinheritable\fP fields are bit masks of -the capabilities defined in \fBcapabilities\fP(7). 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 は、 \fBcapabilities\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