aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-04-29 15:54:28 -0400
committerJames Morris <jmorris@namei.org>2008-04-29 18:24:19 -0400
commit780db6c104de48104501f5943361f2371564b85d (patch)
treed261d4fb8bb751ddf23e64b09d960b1a2ad77116
parente52c1764f18a62776a0f2bc6752fb76b6e345827 (diff)
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: James Morris <jmorris@namei.org>
-rw-r--r--include/linux/capability.h12
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 {
365# error Fix up hand-coded capability macro initializers 365# error Fix up hand-coded capability macro initializers
366#else /* HAND-CODED capability initializers */ 366#else /* HAND-CODED capability initializers */
367 367
368# define CAP_EMPTY_SET {{ 0, 0 }} 368# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }})
369# define CAP_FULL_SET {{ ~0, ~0 }} 369# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }})
370# define CAP_INIT_EFF_SET {{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }} 370# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }})
371# define CAP_FS_SET {{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } } 371# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } })
372# define CAP_NFSD_SET {{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ 372# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \
373 CAP_FS_MASK_B1 } } 373 CAP_FS_MASK_B1 } })
374 374
375#endif /* _LINUX_CAPABILITY_U32S != 2 */ 375#endif /* _LINUX_CAPABILITY_U32S != 2 */
376 376