public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.14-rc1] PR_GET_DUMPABLE returns incorrect info
@ 2005-09-16 15:15 Michael Kerrisk
  2005-09-16 15:23 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Kerrisk @ 2005-09-16 15:15 UTC (permalink / raw)
  To: akpm; +Cc: alan, michael.kerrisk, linux-kernel

[-- 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 +++

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 2.6.14-rc1] PR_GET_DUMPABLE returns incorrect info
  2005-09-16 15:15 [patch 2.6.14-rc1] PR_GET_DUMPABLE returns incorrect info Michael Kerrisk
@ 2005-09-16 15:23 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2005-09-16 15:23 UTC (permalink / raw)
  To: Michael Kerrisk; +Cc: akpm, alan, michael.kerrisk, linux-kernel

On Fri, Sep 16, 2005 at 05:15:36PM +0200, Michael Kerrisk wrote:
> I suggest the following small patch.  Perhaps Alan has comments.

When it went into 2.4-ac I didnt want to expose a value to the user space that
wasn't in the upstream kernel as this was all done for RHEL3 originally.

The change makes total sense to me


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-16 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-16 15:15 [patch 2.6.14-rc1] PR_GET_DUMPABLE returns incorrect info Michael Kerrisk
2005-09-16 15:23 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox