From: Oleg Nesterov 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 Cc: Oren Laadan Cc: Roland McGrath Signed-off-by: Andrew Morton --- kernel/sys.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/sys.c~setpgid-should-not-accept-ptraced-childs kernel/sys.c --- devel/kernel/sys.c~setpgid-should-not-accept-ptraced-childs 2005-12-22 05:09:27.000000000 -0800 +++ devel-akpm/kernel/sys.c 2005-12-22 05:09:27.000000000 -0800 @@ -1109,7 +1109,7 @@ asmlinkage long sys_setpgid(pid_t pid, p 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; _