mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk-lkml@gmx.net>
To: akpm@osdl.org
Cc: alan@redhat.com, michael.kerrisk@gmx.net, linux-kernel@vger.kernel.org
Subject: [patch 2.6.14-rc1] PR_GET_DUMPABLE returns incorrect info
Date: Fri, 16 Sep 2005 17:15:36 +0200 (MEST)	[thread overview]
Message-ID: <18739.1126883736@www47.gmx.net> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1243 bytes --]

Andrew,

2.6.13 incorporated Alan Cox's patch for /proc/sys/fs/suid_dumpable
(one version of this patch can be found here
http://marc.theaimsgroup.com/?l=linux-kernel&m=109647550421014&w=2 ).
This patch also made corresponding changes in kernel/sys.c to
change the prctl() PR_SET_DUMPABLE operation so that the 
permitted range of 'arg2' was modified from 0..1 to 0..2.

However, a corresponding change was not made for 
PR_GET_DUMPABLE: if the dumpable flag is non-zero, then
PR_GET_DUMPABLE always returns 1, so that the caller can't
determine the true setting of this flag.

I suggest the following small patch.  Perhaps Alan has comments.

Cheers,

Michael


--- linux-2.6.14-rc1/kernel/sys.c       2005-09-15 08:21:30.000000000 +0200
+++ linux-2.6.14-rc1-mod/kernel/sys.c   2005-09-16 16:55:29.000000000 +0200
@@ -1729,6 +1729,5 @@
                        break;
                case PR_GET_DUMPABLE:
-                       if (current->mm->dumpable)
-                               error = 1;
+                       error = current->mm->dumpable;
                        break;
                case PR_SET_DUMPABLE:

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++

             reply	other threads:[~2005-09-16 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-16 15:15 Michael Kerrisk [this message]
2005-09-16 15:23 ` Alan Cox

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=18739.1126883736@www47.gmx.net \
    --to=mtk-lkml@gmx.net \
    --cc=akpm@osdl.org \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.kerrisk@gmx.net \
    /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®