Messages in this thread Patch in this message | | | Date | Sun, 11 Dec 2005 20:22:13 +0300 | From | Oleg Nesterov <> | Subject | [PATCH ? 1/2] 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>
--- 2.6.15-rc5/kernel/sys.c~ 2005-11-22 19:35:32.000000000 +0300 +++ 2.6.15-rc5/kernel/sys.c 2005-12-11 22:40:33.000000000 +0300 @@ -1106,7 +1106,7 @@ asmlinkage long sys_setpgid(pid_t pid, p if (!thread_group_leader(p)) goto out; - if (p->parent == current || p->real_parent == current) { + if (p->real_parent == current) { err = -EPERM; if (p->signal->session != current->signal->session) goto out; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |