[PATCH ? 1/2] setpgid: should not accept ptraced childs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux