[patch 2.6.14-rc1] PR_GET_DUMPABLE returns incorrect info

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

 



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 +++
-
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]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux