diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-05-04 10:00:16 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-05-04 10:00:16 -0400 |
| commit | 3a20ac2c52b1317f5a5f0bd9cd3cbe8495ddd026 (patch) | |
| tree | 9a912f2609cefb9698b5cce09cd240bd6dbd09fb /include/linux/capability.h | |
| parent | 18cc8d8d9b74c446832336d8f6e1afb145f9431b (diff) | |
| parent | 3e5b50165fd0be080044586f43fcdd460ed27610 (diff) | |
Merge branch 'fix/pcm-jiffies-check' into fix/asoc
Diffstat (limited to 'include/linux/capability.h')
| -rw-r--r-- | include/linux/capability.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 02bdb768d43b..c3021105edc0 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -69,10 +69,6 @@ typedef struct __user_cap_data_struct { | |||
| 69 | #define VFS_CAP_U32 VFS_CAP_U32_2 | 69 | #define VFS_CAP_U32 VFS_CAP_U32_2 |
| 70 | #define VFS_CAP_REVISION VFS_CAP_REVISION_2 | 70 | #define VFS_CAP_REVISION VFS_CAP_REVISION_2 |
| 71 | 71 | ||
| 72 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
| 73 | extern int file_caps_enabled; | ||
| 74 | #endif | ||
| 75 | |||
| 76 | struct vfs_cap_data { | 72 | struct vfs_cap_data { |
| 77 | __le32 magic_etc; /* Little endian */ | 73 | __le32 magic_etc; /* Little endian */ |
| 78 | struct { | 74 | struct { |
| @@ -96,6 +92,10 @@ struct vfs_cap_data { | |||
| 96 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | 92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 |
| 97 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | 93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 |
| 98 | 94 | ||
| 95 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
| 96 | extern int file_caps_enabled; | ||
| 97 | #endif | ||
| 98 | |||
| 99 | typedef struct kernel_cap_struct { | 99 | typedef struct kernel_cap_struct { |
| 100 | __u32 cap[_KERNEL_CAPABILITY_U32S]; | 100 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
| 101 | } kernel_cap_t; | 101 | } kernel_cap_t; |
| @@ -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,9 +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 \ |
| 396 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ | 410 | | CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \ |
| 397 | CAP_FS_MASK_B1 } }) | 411 | CAP_FS_MASK_B1 } }) |
| 412 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ | ||
| 413 | | CAP_TO_MASK(CAP_SYS_RESOURCE), \ | ||
| 414 | CAP_FS_MASK_B1 } }) | ||
| 398 | 415 | ||
| 399 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ | 416 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
| 400 | 417 | ||
