From: Oleg Nesterov Date: Sun, 8 Jan 2006 09:03:09 +0000 (-0800) Subject: [PATCH] kill_proc_info_as_uid: don't use hardcoded constants X-Git-Tag: firefly_0821_release~39501 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0811af28ce49fab963e3e6b8abcf8c460f971cd4;p=firefly-linux-kernel-4.4.55.git [PATCH] kill_proc_info_as_uid: don't use hardcoded constants Use symbolic names instead of hardcoded constants. Signed-off-by: Oleg Nesterov Acked-by: Harald Welte Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/signal.c b/kernel/signal.c index e20724af9b36..114cf9209bcd 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1220,8 +1220,7 @@ int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, ret = -ESRCH; goto out_unlock; } - if ((!info || ((unsigned long)info != 1 && - (unsigned long)info != 2 && SI_FROMUSER(info))) + if ((info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info))) && (euid != p->suid) && (euid != p->uid) && (uid != p->suid) && (uid != p->uid)) { ret = -EPERM;