aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk-lkml@gmx.net>2005-09-16 22:28:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 14:50:01 -0400
commit2030c0fd3db3332378f95f479c286181e3920644 (patch)
tree3e281950e61e4659c0ca2cb04e63aa8d510013b8 /kernel
parentafeda2c24e74cbddde376e06fdd82c215f9cb637 (diff)
[PATCH] PR_GET_DUMPABLE returns incorrect info
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. Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sys.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index c80412be2302..f723522e6986 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1728,8 +1728,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
1728 error = put_user(current->pdeath_signal, (int __user *)arg2); 1728 error = put_user(current->pdeath_signal, (int __user *)arg2);
1729 break; 1729 break;
1730 case PR_GET_DUMPABLE: 1730 case PR_GET_DUMPABLE:
1731 if (current->mm->dumpable) 1731 error = current->mm->dumpable;
1732 error = 1;
1733 break; 1732 break;
1734 case PR_SET_DUMPABLE: 1733 case PR_SET_DUMPABLE:
1735 if (arg2 < 0 || arg2 > 2) { 1734 if (arg2 < 0 || arg2 > 2) {