aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-07 05:26:19 -0400
committerJames Morris <jmorris@namei.org>2009-06-24 10:18:05 -0400
commit9e48858f7d36a6a3849f1d1b40c3bf5624b4ee7c (patch)
tree5d8fe586c5b1bbab36acc3b76b2b4dd1bc538968 /include/linux/security.h
parent86abcf9cebf7b5ceb33facde297face5ec4d2260 (diff)
security: rename ptrace_may_access => ptrace_access_check
The ->ptrace_may_access() methods are named confusingly - the real ptrace_may_access() returns a bool, while these security checks have a retval convention. Rename it to ptrace_access_check, to reduce the confusion factor. [ Impact: cleanup, no code changed ] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 5eff459b3833..145909165dbf 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -52,7 +52,7 @@ struct audit_krule;
52extern int cap_capable(struct task_struct *tsk, const struct cred *cred, 52extern int cap_capable(struct task_struct *tsk, const struct cred *cred,
53 int cap, int audit); 53 int cap, int audit);
54extern int cap_settime(struct timespec *ts, struct timezone *tz); 54extern int cap_settime(struct timespec *ts, struct timezone *tz);
55extern int cap_ptrace_may_access(struct task_struct *child, unsigned int mode); 55extern int cap_ptrace_access_check(struct task_struct *child, unsigned int mode);
56extern int cap_ptrace_traceme(struct task_struct *parent); 56extern int cap_ptrace_traceme(struct task_struct *parent);
57extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 57extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
58extern int cap_capset(struct cred *new, const struct cred *old, 58extern int cap_capset(struct cred *new, const struct cred *old,
@@ -1209,7 +1209,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1209 * @alter contains the flag indicating whether changes are to be made. 1209 * @alter contains the flag indicating whether changes are to be made.
1210 * Return 0 if permission is granted. 1210 * Return 0 if permission is granted.
1211 * 1211 *
1212 * @ptrace_may_access: 1212 * @ptrace_access_check:
1213 * Check permission before allowing the current process to trace the 1213 * Check permission before allowing the current process to trace the
1214 * @child process. 1214 * @child process.
1215 * Security modules may also want to perform a process tracing check 1215 * Security modules may also want to perform a process tracing check
@@ -1224,7 +1224,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1224 * Check that the @parent process has sufficient permission to trace the 1224 * Check that the @parent process has sufficient permission to trace the
1225 * current process before allowing the current process to present itself 1225 * current process before allowing the current process to present itself
1226 * to the @parent process for tracing. 1226 * to the @parent process for tracing.
1227 * The parent process will still have to undergo the ptrace_may_access 1227 * The parent process will still have to undergo the ptrace_access_check
1228 * checks before it is allowed to trace this one. 1228 * checks before it is allowed to trace this one.
1229 * @parent contains the task_struct structure for debugger process. 1229 * @parent contains the task_struct structure for debugger process.
1230 * Return 0 if permission is granted. 1230 * Return 0 if permission is granted.
@@ -1336,7 +1336,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1336struct security_operations { 1336struct security_operations {
1337 char name[SECURITY_NAME_MAX + 1]; 1337 char name[SECURITY_NAME_MAX + 1];
1338 1338
1339 int (*ptrace_may_access) (struct task_struct *child, unsigned int mode); 1339 int (*ptrace_access_check) (struct task_struct *child, unsigned int mode);
1340 int (*ptrace_traceme) (struct task_struct *parent); 1340 int (*ptrace_traceme) (struct task_struct *parent);
1341 int (*capget) (struct task_struct *target, 1341 int (*capget) (struct task_struct *target,
1342 kernel_cap_t *effective, 1342 kernel_cap_t *effective,
@@ -1617,7 +1617,7 @@ extern int security_module_enable(struct security_operations *ops);
1617extern int register_security(struct security_operations *ops); 1617extern int register_security(struct security_operations *ops);
1618 1618
1619/* Security operations */ 1619/* Security operations */
1620int security_ptrace_may_access(struct task_struct *child, unsigned int mode); 1620int security_ptrace_access_check(struct task_struct *child, unsigned int mode);
1621int security_ptrace_traceme(struct task_struct *parent); 1621int security_ptrace_traceme(struct task_struct *parent);
1622int security_capget(struct task_struct *target, 1622int security_capget(struct task_struct *target,
1623 kernel_cap_t *effective, 1623 kernel_cap_t *effective,
@@ -1798,10 +1798,10 @@ static inline int security_init(void)
1798 return 0; 1798 return 0;
1799} 1799}
1800 1800
1801static inline int security_ptrace_may_access(struct task_struct *child, 1801static inline int security_ptrace_access_check(struct task_struct *child,
1802 unsigned int mode) 1802 unsigned int mode)
1803{ 1803{
1804 return cap_ptrace_may_access(child, mode); 1804 return cap_ptrace_access_check(child, mode);
1805} 1805}
1806 1806
1807static inline int security_ptrace_traceme(struct task_struct *parent) 1807static inline int security_ptrace_traceme(struct task_struct *parent)