diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-01-08 01:03:59 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:14:01 -0800 |
commit | f7dd795e913656c390b6bde27790c518973feea1 (patch) | |
tree | d3e61e8e19018b94e80d2a332fa0b9e304007365 /kernel/sys.c | |
parent | e19f247a3dbd85485ec13174817ae9c2478fe541 (diff) | |
download | linux-stable-f7dd795e913656c390b6bde27790c518973feea1.tar.gz linux-stable-f7dd795e913656c390b6bde27790c518973feea1.tar.bz2 linux-stable-f7dd795e913656c390b6bde27790c518973feea1.zip |
[PATCH] setpgid: should not accept ptraced childs
sys_setpgid() allows to change ->pgrp of ptraced childs.
'man setpgid' does not tell anything about that, so I consider
this behaviour is a bug.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Oren Laadan <orenl@cs.columbia.edu>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index f497bf56ada1..218937e837dc 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1114,7 +1114,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) if (!thread_group_leader(p)) goto out; - if (p->parent == current || p->real_parent == group_leader) { + if (p->real_parent == group_leader) { err = -EPERM; if (p->signal->session != group_leader->signal->session) goto out; |