mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: akpm@osdl.org
Cc: orenl@cs.columbia.edu, roland@redhat.com,
	Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: [PATCH ? 1/2] setpgid: should not accept ptraced childs
Date: Sun, 11 Dec 2005 20:22:13 +0300	[thread overview]
Message-ID: <439C6045.D48876F9@tv-sign.ru> (raw)
In-Reply-To: <200512110523.jBB5NVEr002551@shell0.pdx.osdl.net>

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;

       reply	other threads:[~2005-12-11 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200512110523.jBB5NVEr002551@shell0.pdx.osdl.net>
2005-12-11 17:22 ` Oleg Nesterov [this message]
2005-12-11 17:22 ` [PATCH ? 2/2] setpgid: should work for sub-threads Oleg Nesterov
2005-12-11 21:14   ` Oren Laadan
2005-12-12 13:18     ` Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=439C6045.D48876F9@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=orenl@cs.columbia.edu \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®