diff options
author | David Howells <dhowells@redhat.com> | 2008-04-29 20:54:28 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 13:22:56 -0700 |
commit | 25f2ea9fc8c7ec34d351cef7dade2e8046e49ed1 (patch) | |
tree | d261d4fb8bb751ddf23e64b09d960b1a2ad77116 /include/linux/capability.h | |
parent | 7bf570dc8dcf76df2a9f583bef2da96d4289ed0d (diff) | |
download | linux-stable-25f2ea9fc8c7ec34d351cef7dade2e8046e49ed1.tar.gz linux-stable-25f2ea9fc8c7ec34d351cef7dade2e8046e49ed1.tar.bz2 linux-stable-25f2ea9fc8c7ec34d351cef7dade2e8046e49ed1.zip |
Security: Typecast CAP_*_SET macros
Cast the CAP_*_SET macros to be of kernel_cap_t type to avoid compiler
warnings.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/capability.h')
-rw-r--r-- | include/linux/capability.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index eaab759b1460..f4ea0dd9a618 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -365,12 +365,12 @@ typedef struct kernel_cap_struct { # error Fix up hand-coded capability macro initializers #else /* HAND-CODED capability initializers */ -# define CAP_EMPTY_SET {{ 0, 0 }} -# define CAP_FULL_SET {{ ~0, ~0 }} -# define CAP_INIT_EFF_SET {{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }} -# define CAP_FS_SET {{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } } -# define CAP_NFSD_SET {{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ - CAP_FS_MASK_B1 } } +# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }}) +# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) +# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) +# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) +# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ + CAP_FS_MASK_B1 } }) #endif /* _LINUX_CAPABILITY_U32S != 2 */ |