diff options
| author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2010-10-14 15:21:18 -0400 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2010-10-20 19:12:44 -0400 |
| commit | b0ae19811375031ae3b3fecc65b702a9c6e5cc28 (patch) | |
| tree | a765b71155fbed1ed3a3cff35c1044ad49a002ae /include/linux | |
| parent | 9b3056cca09529d34af2d81305b2a9c6b622ca1b (diff) | |
security: remove unused parameter from security_task_setscheduler()
All security modules shouldn't change sched_param parameter of
security_task_setscheduler(). This is not only meaningless, but also
make a harmful result if caller pass a static variable.
This patch remove policy and sched_param parameter from
security_task_setscheduler() becuase none of security module is
using it.
Cc: James Morris <jmorris@namei.org>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/security.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index a22219afff09..294a0b228123 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -74,7 +74,7 @@ extern int cap_file_mmap(struct file *file, unsigned long reqprot, | |||
| 74 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); | 74 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); |
| 75 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 75 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
| 76 | unsigned long arg4, unsigned long arg5); | 76 | unsigned long arg4, unsigned long arg5); |
| 77 | extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp); | 77 | extern int cap_task_setscheduler(struct task_struct *p); |
| 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); | 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); |
| 79 | extern int cap_task_setnice(struct task_struct *p, int nice); | 79 | extern int cap_task_setnice(struct task_struct *p, int nice); |
| 80 | extern int cap_syslog(int type, bool from_file); | 80 | extern int cap_syslog(int type, bool from_file); |
| @@ -1501,8 +1501,7 @@ struct security_operations { | |||
| 1501 | int (*task_getioprio) (struct task_struct *p); | 1501 | int (*task_getioprio) (struct task_struct *p); |
| 1502 | int (*task_setrlimit) (struct task_struct *p, unsigned int resource, | 1502 | int (*task_setrlimit) (struct task_struct *p, unsigned int resource, |
| 1503 | struct rlimit *new_rlim); | 1503 | struct rlimit *new_rlim); |
| 1504 | int (*task_setscheduler) (struct task_struct *p, int policy, | 1504 | int (*task_setscheduler) (struct task_struct *p); |
| 1505 | struct sched_param *lp); | ||
| 1506 | int (*task_getscheduler) (struct task_struct *p); | 1505 | int (*task_getscheduler) (struct task_struct *p); |
| 1507 | int (*task_movememory) (struct task_struct *p); | 1506 | int (*task_movememory) (struct task_struct *p); |
| 1508 | int (*task_kill) (struct task_struct *p, | 1507 | int (*task_kill) (struct task_struct *p, |
| @@ -1752,8 +1751,7 @@ int security_task_setioprio(struct task_struct *p, int ioprio); | |||
| 1752 | int security_task_getioprio(struct task_struct *p); | 1751 | int security_task_getioprio(struct task_struct *p); |
| 1753 | int security_task_setrlimit(struct task_struct *p, unsigned int resource, | 1752 | int security_task_setrlimit(struct task_struct *p, unsigned int resource, |
| 1754 | struct rlimit *new_rlim); | 1753 | struct rlimit *new_rlim); |
| 1755 | int security_task_setscheduler(struct task_struct *p, | 1754 | int security_task_setscheduler(struct task_struct *p); |
| 1756 | int policy, struct sched_param *lp); | ||
| 1757 | int security_task_getscheduler(struct task_struct *p); | 1755 | int security_task_getscheduler(struct task_struct *p); |
| 1758 | int security_task_movememory(struct task_struct *p); | 1756 | int security_task_movememory(struct task_struct *p); |
| 1759 | int security_task_kill(struct task_struct *p, struct siginfo *info, | 1757 | int security_task_kill(struct task_struct *p, struct siginfo *info, |
| @@ -2320,11 +2318,9 @@ static inline int security_task_setrlimit(struct task_struct *p, | |||
| 2320 | return 0; | 2318 | return 0; |
| 2321 | } | 2319 | } |
| 2322 | 2320 | ||
| 2323 | static inline int security_task_setscheduler(struct task_struct *p, | 2321 | static inline int security_task_setscheduler(struct task_struct *p) |
| 2324 | int policy, | ||
| 2325 | struct sched_param *lp) | ||
| 2326 | { | 2322 | { |
| 2327 | return cap_task_setscheduler(p, policy, lp); | 2323 | return cap_task_setscheduler(p); |
| 2328 | } | 2324 | } |
| 2329 | 2325 | ||
| 2330 | static inline int security_task_getscheduler(struct task_struct *p) | 2326 | static inline int security_task_getscheduler(struct task_struct *p) |
