aboutsummaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-11-13 18:39:14 -0500
committerJames Morris <jmorris@namei.org>2008-11-13 18:39:14 -0500
commit1cdcbec1a3372c0c49c59d292e708fd07b509f18 (patch)
treed1bd302c8d66862da45b494cbc766fb4caa5e23e /security/security.c
parent8bbf4976b59fc9fc2861e79cab7beb3f6d647640 (diff)
CRED: Neuter sys_capset()
Take away the ability for sys_capset() to affect processes other than current. This means that current will not need to lock its own credentials when reading them against interference by other processes. This has effectively been the case for a while anyway, since: (1) Without LSM enabled, sys_capset() is disallowed. (2) With file-based capabilities, sys_capset() is neutered. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Andrew G. Morgan <morgan@kernel.org> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/security/security.c b/security/security.c
index 346f21e0ec2c..dca37381e2a7 100644
--- a/security/security.c
+++ b/security/security.c
@@ -145,20 +145,18 @@ int security_capget(struct task_struct *target,
145 return security_ops->capget(target, effective, inheritable, permitted); 145 return security_ops->capget(target, effective, inheritable, permitted);
146} 146}
147 147
148int security_capset_check(struct task_struct *target, 148int security_capset_check(kernel_cap_t *effective,
149 kernel_cap_t *effective, 149 kernel_cap_t *inheritable,
150 kernel_cap_t *inheritable, 150 kernel_cap_t *permitted)
151 kernel_cap_t *permitted)
152{ 151{
153 return security_ops->capset_check(target, effective, inheritable, permitted); 152 return security_ops->capset_check(effective, inheritable, permitted);
154} 153}
155 154
156void security_capset_set(struct task_struct *target, 155void security_capset_set(kernel_cap_t *effective,
157 kernel_cap_t *effective, 156 kernel_cap_t *inheritable,
158 kernel_cap_t *inheritable, 157 kernel_cap_t *permitted)
159 kernel_cap_t *permitted)
160{ 158{
161 security_ops->capset_set(target, effective, inheritable, permitted); 159 security_ops->capset_set(effective, inheritable, permitted);
162} 160}
163 161
164int security_capable(struct task_struct *tsk, int cap) 162int security_capable(struct task_struct *tsk, int cap)