提交 0811af28 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

[PATCH] kill_proc_info_as_uid: don't use hardcoded constants

Use symbolic names instead of hardcoded constants.
Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
Acked-by: NHarald Welte <laforge@gnumonks.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 54b21a79
...@@ -1220,8 +1220,7 @@ int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, ...@@ -1220,8 +1220,7 @@ int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid,
ret = -ESRCH; ret = -ESRCH;
goto out_unlock; goto out_unlock;
} }
if ((!info || ((unsigned long)info != 1 && if ((info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info)))
(unsigned long)info != 2 && SI_FROMUSER(info)))
&& (euid != p->suid) && (euid != p->uid) && (euid != p->suid) && (euid != p->uid)
&& (uid != p->suid) && (uid != p->uid)) { && (uid != p->suid) && (uid != p->uid)) {
ret = -EPERM; ret = -EPERM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册