Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0811af28 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

[PATCH] kill_proc_info_as_uid: don't use hardcoded constants



Use symbolic names instead of hardcoded constants.

Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Acked-by: default avatarHarald Welte <laforge@gnumonks.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 54b21a79
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;