diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-01-08 01:03:09 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:13:55 -0800 |
commit | 0811af28ce49fab963e3e6b8abcf8c460f971cd4 (patch) | |
tree | a7a619307a471d713cddb67ef94e3768152fc4bb | |
parent | 54b21a7992a31d30c9a91f7e0a00ffdb4bd0caee (diff) | |
download | linux-3.10-0811af28ce49fab963e3e6b8abcf8c460f971cd4.tar.gz linux-3.10-0811af28ce49fab963e3e6b8abcf8c460f971cd4.tar.bz2 linux-3.10-0811af28ce49fab963e3e6b8abcf8c460f971cd4.zip |
[PATCH] kill_proc_info_as_uid: don't use hardcoded constants
Use symbolic names instead of hardcoded constants.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/signal.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index e20724af9b3..114cf9209bc 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; |