diff options
author | David Howells <dhowells@redhat.com> | 2008-11-13 18:39:15 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-13 18:39:15 -0500 |
commit | 15a2460ed0af7538ca8e6c610fe607a2cd9da142 (patch) | |
tree | 3611bc03e9c30fe0d11454f6966e6b0ca7f1dbd0 /security/commoncap.c | |
parent | 1cdcbec1a3372c0c49c59d292e708fd07b509f18 (diff) |
CRED: Constify the kernel_cap_t arguments to the capset LSM hooks
Constify the kernel_cap_t arguments to the capset LSM hooks.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index e3f36ef629fa..fb4e240720d8 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -118,8 +118,9 @@ static inline int cap_limit_ptraced_target(void) | |||
118 | 118 | ||
119 | #endif /* def CONFIG_SECURITY_FILE_CAPABILITIES */ | 119 | #endif /* def CONFIG_SECURITY_FILE_CAPABILITIES */ |
120 | 120 | ||
121 | int cap_capset_check (kernel_cap_t *effective, | 121 | int cap_capset_check(const kernel_cap_t *effective, |
122 | kernel_cap_t *inheritable, kernel_cap_t *permitted) | 122 | const kernel_cap_t *inheritable, |
123 | const kernel_cap_t *permitted) | ||
123 | { | 124 | { |
124 | if (cap_inh_is_capped() | 125 | if (cap_inh_is_capped() |
125 | && !cap_issubset(*inheritable, | 126 | && !cap_issubset(*inheritable, |
@@ -150,8 +151,9 @@ int cap_capset_check (kernel_cap_t *effective, | |||
150 | return 0; | 151 | return 0; |
151 | } | 152 | } |
152 | 153 | ||
153 | void cap_capset_set (kernel_cap_t *effective, | 154 | void cap_capset_set(const kernel_cap_t *effective, |
154 | kernel_cap_t *inheritable, kernel_cap_t *permitted) | 155 | const kernel_cap_t *inheritable, |
156 | const kernel_cap_t *permitted) | ||
155 | { | 157 | { |
156 | current->cap_effective = *effective; | 158 | current->cap_effective = *effective; |
157 | current->cap_inheritable = *inheritable; | 159 | current->cap_inheritable = *inheritable; |