mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kill_proc_info_as_uid: don't use hardcoded constants
@ 2005-11-23 14:24 Oleg Nesterov
  2005-11-24 20:48 ` Harald Welte
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2005-11-23 14:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Harald Welte, Andrew Morton

Use symbolic names instead of hardcoded constants.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 2.6.15-rc2/kernel/signal.c~1_KUID	2005-11-22 19:35:52.000000000 +0300
+++ 2.6.15-rc2/kernel/signal.c	2005-11-23 19:17:35.000000000 +0300
@@ -1163,8 +1163,7 @@ int kill_proc_info_as_uid(int sig, struc
 		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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-24 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-23 14:24 [PATCH] kill_proc_info_as_uid: don't use hardcoded constants Oleg Nesterov
2005-11-24 20:48 ` Harald Welte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®