diff options
-rw-r--r-- | include/linux/sched.h | 2 | ||||
-rw-r--r-- | kernel/signal.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 821f0481ebe1..aaf723308ed4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1153,7 +1153,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *); | |||
1153 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); | 1153 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); |
1154 | extern int kill_pg_info(int, struct siginfo *, pid_t); | 1154 | extern int kill_pg_info(int, struct siginfo *, pid_t); |
1155 | extern int kill_proc_info(int, struct siginfo *, pid_t); | 1155 | extern int kill_proc_info(int, struct siginfo *, pid_t); |
1156 | extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t); | 1156 | extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t, u32); |
1157 | extern void do_notify_parent(struct task_struct *, int); | 1157 | extern void do_notify_parent(struct task_struct *, int); |
1158 | extern void force_sig(int, struct task_struct *); | 1158 | extern void force_sig(int, struct task_struct *); |
1159 | extern void force_sig_specific(int, struct task_struct *); | 1159 | extern void force_sig_specific(int, struct task_struct *); |
diff --git a/kernel/signal.c b/kernel/signal.c index 52adf53929f6..477d11adf3d1 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -584,7 +584,7 @@ static int check_kill_permission(int sig, struct siginfo *info, | |||
584 | && !capable(CAP_KILL)) | 584 | && !capable(CAP_KILL)) |
585 | return error; | 585 | return error; |
586 | 586 | ||
587 | error = security_task_kill(t, info, sig); | 587 | error = security_task_kill(t, info, sig, 0); |
588 | if (!error) | 588 | if (!error) |
589 | audit_signal_info(sig, t); /* Let audit system see the signal */ | 589 | audit_signal_info(sig, t); /* Let audit system see the signal */ |
590 | return error; | 590 | return error; |
@@ -1107,7 +1107,7 @@ kill_proc_info(int sig, struct siginfo *info, pid_t pid) | |||
1107 | 1107 | ||
1108 | /* like kill_proc_info(), but doesn't use uid/euid of "current" */ | 1108 | /* like kill_proc_info(), but doesn't use uid/euid of "current" */ |
1109 | int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, | 1109 | int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, |
1110 | uid_t uid, uid_t euid) | 1110 | uid_t uid, uid_t euid, u32 secid) |
1111 | { | 1111 | { |
1112 | int ret = -EINVAL; | 1112 | int ret = -EINVAL; |
1113 | struct task_struct *p; | 1113 | struct task_struct *p; |
@@ -1127,6 +1127,9 @@ int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, | |||
1127 | ret = -EPERM; | 1127 | ret = -EPERM; |
1128 | goto out_unlock; | 1128 | goto out_unlock; |
1129 | } | 1129 | } |
1130 | ret = security_task_kill(p, info, sig, secid); | ||
1131 | if (ret) | ||
1132 | goto out_unlock; | ||
1130 | if (sig && p->sighand) { | 1133 | if (sig && p->sighand) { |
1131 | unsigned long flags; | 1134 | unsigned long flags; |
1132 | spin_lock_irqsave(&p->sighand->siglock, flags); | 1135 | spin_lock_irqsave(&p->sighand->siglock, flags); |