diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:27 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:31 -0400 |
| commit | 41fb454ebe6024f5c1e3b3cbc0abc0da762e7b51 (patch) | |
| tree | 51c50bcb67a5039448ddfa1869d7948cab1217e9 /include/linux/capability.h | |
| parent | 19c1a6f5764d787113fa323ffb18be7991208f82 (diff) | |
| parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) | |
Merge commit 'v2.6.30-rc5' into core/iommu
Merge reason: core/iommu was on an .30-rc1 base,
update it to .30-rc5 to refresh.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/capability.h')
| -rw-r--r-- | include/linux/capability.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 4864a43b2b45..c3021105edc0 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -377,7 +377,21 @@ struct cpu_vfs_cap_data { | |||
| 377 | #define CAP_FOR_EACH_U32(__capi) \ | 377 | #define CAP_FOR_EACH_U32(__capi) \ |
| 378 | for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) | 378 | for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) |
| 379 | 379 | ||
| 380 | /* | ||
| 381 | * CAP_FS_MASK and CAP_NFSD_MASKS: | ||
| 382 | * | ||
| 383 | * The fs mask is all the privileges that fsuid==0 historically meant. | ||
| 384 | * At one time in the past, that included CAP_MKNOD and CAP_LINUX_IMMUTABLE. | ||
| 385 | * | ||
| 386 | * It has never meant setting security.* and trusted.* xattrs. | ||
| 387 | * | ||
| 388 | * We could also define fsmask as follows: | ||
| 389 | * 1. CAP_FS_MASK is the privilege to bypass all fs-related DAC permissions | ||
| 390 | * 2. The security.* and trusted.* xattrs are fs-related MAC permissions | ||
| 391 | */ | ||
| 392 | |||
| 380 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ | 393 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ |
| 394 | | CAP_TO_MASK(CAP_MKNOD) \ | ||
| 381 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ | 395 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ |
| 382 | | CAP_TO_MASK(CAP_DAC_READ_SEARCH) \ | 396 | | CAP_TO_MASK(CAP_DAC_READ_SEARCH) \ |
| 383 | | CAP_TO_MASK(CAP_FOWNER) \ | 397 | | CAP_TO_MASK(CAP_FOWNER) \ |
| @@ -392,11 +406,12 @@ struct cpu_vfs_cap_data { | |||
| 392 | # define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }}) | 406 | # define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }}) |
| 393 | # define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) | 407 | # define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) |
| 394 | # define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) | 408 | # define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) |
| 395 | # define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) | 409 | # define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ |
| 410 | | CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \ | ||
| 411 | CAP_FS_MASK_B1 } }) | ||
| 396 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ | 412 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ |
| 397 | | CAP_TO_MASK(CAP_SYS_RESOURCE) \ | 413 | | CAP_TO_MASK(CAP_SYS_RESOURCE), \ |
| 398 | | CAP_TO_MASK(CAP_MKNOD), \ | 414 | CAP_FS_MASK_B1 } }) |
| 399 | CAP_FS_MASK_B1 } }) | ||
| 400 | 415 | ||
| 401 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ | 416 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
| 402 | 417 | ||
