aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-11-13 18:39:15 -0500
committerJames Morris <jmorris@namei.org>2008-11-13 18:39:15 -0500
commit15a2460ed0af7538ca8e6c610fe607a2cd9da142 (patch)
tree3611bc03e9c30fe0d11454f6966e6b0ca7f1dbd0 /include
parent1cdcbec1a3372c0c49c59d292e708fd07b509f18 (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 'include')
-rw-r--r--include/linux/security.h44
1 files changed, 24 insertions, 20 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index d1ce8beddbd7..9f305d4a31a7 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -53,8 +53,12 @@ extern int cap_settime(struct timespec *ts, struct timezone *tz);
53extern int cap_ptrace_may_access(struct task_struct *child, unsigned int mode); 53extern int cap_ptrace_may_access(struct task_struct *child, unsigned int mode);
54extern int cap_ptrace_traceme(struct task_struct *parent); 54extern int cap_ptrace_traceme(struct task_struct *parent);
55extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 55extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
56extern int cap_capset_check(kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 56extern int cap_capset_check(const kernel_cap_t *effective,
57extern void cap_capset_set(kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 57 const kernel_cap_t *inheritable,
58 const kernel_cap_t *permitted);
59extern void cap_capset_set(const kernel_cap_t *effective,
60 const kernel_cap_t *inheritable,
61 const kernel_cap_t *permitted);
58extern int cap_bprm_set_security(struct linux_binprm *bprm); 62extern int cap_bprm_set_security(struct linux_binprm *bprm);
59extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); 63extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe);
60extern int cap_bprm_secureexec(struct linux_binprm *bprm); 64extern int cap_bprm_secureexec(struct linux_binprm *bprm);
@@ -1293,12 +1297,12 @@ struct security_operations {
1293 int (*capget) (struct task_struct *target, 1297 int (*capget) (struct task_struct *target,
1294 kernel_cap_t *effective, 1298 kernel_cap_t *effective,
1295 kernel_cap_t *inheritable, kernel_cap_t *permitted); 1299 kernel_cap_t *inheritable, kernel_cap_t *permitted);
1296 int (*capset_check) (kernel_cap_t *effective, 1300 int (*capset_check) (const kernel_cap_t *effective,
1297 kernel_cap_t *inheritable, 1301 const kernel_cap_t *inheritable,
1298 kernel_cap_t *permitted); 1302 const kernel_cap_t *permitted);
1299 void (*capset_set) (kernel_cap_t *effective, 1303 void (*capset_set) (const kernel_cap_t *effective,
1300 kernel_cap_t *inheritable, 1304 const kernel_cap_t *inheritable,
1301 kernel_cap_t *permitted); 1305 const kernel_cap_t *permitted);
1302 int (*capable) (struct task_struct *tsk, int cap, int audit); 1306 int (*capable) (struct task_struct *tsk, int cap, int audit);
1303 int (*acct) (struct file *file); 1307 int (*acct) (struct file *file);
1304 int (*sysctl) (struct ctl_table *table, int op); 1308 int (*sysctl) (struct ctl_table *table, int op);
@@ -1560,12 +1564,12 @@ int security_capget(struct task_struct *target,
1560 kernel_cap_t *effective, 1564 kernel_cap_t *effective,
1561 kernel_cap_t *inheritable, 1565 kernel_cap_t *inheritable,
1562 kernel_cap_t *permitted); 1566 kernel_cap_t *permitted);
1563int security_capset_check(kernel_cap_t *effective, 1567int security_capset_check(const kernel_cap_t *effective,
1564 kernel_cap_t *inheritable, 1568 const kernel_cap_t *inheritable,
1565 kernel_cap_t *permitted); 1569 const kernel_cap_t *permitted);
1566void security_capset_set(kernel_cap_t *effective, 1570void security_capset_set(const kernel_cap_t *effective,
1567 kernel_cap_t *inheritable, 1571 const kernel_cap_t *inheritable,
1568 kernel_cap_t *permitted); 1572 const kernel_cap_t *permitted);
1569int security_capable(struct task_struct *tsk, int cap); 1573int security_capable(struct task_struct *tsk, int cap);
1570int security_capable_noaudit(struct task_struct *tsk, int cap); 1574int security_capable_noaudit(struct task_struct *tsk, int cap);
1571int security_acct(struct file *file); 1575int security_acct(struct file *file);
@@ -1755,16 +1759,16 @@ static inline int security_capget(struct task_struct *target,
1755 return cap_capget(target, effective, inheritable, permitted); 1759 return cap_capget(target, effective, inheritable, permitted);
1756} 1760}
1757 1761
1758static inline int security_capset_check(kernel_cap_t *effective, 1762static inline int security_capset_check(const kernel_cap_t *effective,
1759 kernel_cap_t *inheritable, 1763 const kernel_cap_t *inheritable,
1760 kernel_cap_t *permitted) 1764 const kernel_cap_t *permitted)
1761{ 1765{
1762 return cap_capset_check(effective, inheritable, permitted); 1766 return cap_capset_check(effective, inheritable, permitted);
1763} 1767}
1764 1768
1765static inline void security_capset_set(kernel_cap_t *effective, 1769static inline void security_capset_set(const kernel_cap_t *effective,
1766 kernel_cap_t *inheritable, 1770 const kernel_cap_t *inheritable,
1767 kernel_cap_t *permitted) 1771 const kernel_cap_t *permitted)
1768{ 1772{
1769 cap_capset_set(effective, inheritable, permitted); 1773 cap_capset_set(effective, inheritable, permitted);
1770} 1774}