aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 8644d864e3c1..8abd542c6b7c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -4036,16 +4036,19 @@ static int selinux_task_movememory(struct task_struct *p)
4036} 4036}
4037 4037
4038static int selinux_task_kill(struct task_struct *p, struct siginfo *info, 4038static int selinux_task_kill(struct task_struct *p, struct siginfo *info,
4039 int sig, u32 secid) 4039 int sig, const struct cred *cred)
4040{ 4040{
4041 u32 secid;
4041 u32 perm; 4042 u32 perm;
4042 4043
4043 if (!sig) 4044 if (!sig)
4044 perm = PROCESS__SIGNULL; /* null signal; existence test */ 4045 perm = PROCESS__SIGNULL; /* null signal; existence test */
4045 else 4046 else
4046 perm = signal_to_av(sig); 4047 perm = signal_to_av(sig);
4047 if (!secid) 4048 if (!cred)
4048 secid = current_sid(); 4049 secid = current_sid();
4050 else
4051 secid = cred_sid(cred);
4049 return avc_has_perm(secid, task_sid(p), SECCLASS_PROCESS, perm, NULL); 4052 return avc_has_perm(secid, task_sid(p), SECCLASS_PROCESS, perm, NULL);
4050} 4053}
4051 4054