lkml.org 
[lkml]   [2011]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 resend 12/12] proc: enable writing to /proc/pid/mem
Date
With recent changes there is no longer a security hazard with writing to
/proc/pid/mem. Remove the #ifdef.

Signed-off-by: Stephen Wilson <wilsons@start.ca>
---
fs/proc/base.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index ebe3c47..a0cfcd4 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -852,10 +852,6 @@ out_no_task:
return ret;
}

-#define mem_write NULL
-
-#ifndef mem_write
-/* This is a security hazard */
static ssize_t mem_write(struct file * file, const char __user *buf,
size_t count, loff_t *ppos)
{
@@ -912,7 +908,6 @@ out_task:
out_no_task:
return copied;
}
-#endif

loff_t mem_lseek(struct file *file, loff_t offset, int orig)
{
--
1.7.3.5


\
 
 \ /
  Last update: 2011-03-23 15:53    [W:0.606 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site