lkml.org 
[lkml]   [2005]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2005-12-11 17:09    [W:0.026 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site