From 5116dca8e1e3430bc66d672a9f1afcebf5859526 Mon Sep 17 00:00:00 2001 From: Andrey Turkin Date: Thu, 22 Oct 2009 17:09:51 +0400 Subject: [PATCH] server: Open mem file for write when writing memory. --- server/procfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/procfs.c b/server/procfs.c index f7d9073607c..5caa02b66df 100644 --- a/server/procfs.c +++ b/server/procfs.c @@ -161,7 +161,7 @@ int write_process_memory( struct process *process, client_ptr_t ptr, size_t size return 0; } - if ((fd = open_proc_as( process, O_RDONLY )) == -1) return 0; + if ((fd = open_proc_as( process, O_WRONLY )) == -1) return 0; ret = pwrite( fd, src, size, (off_t)ptr ); close( fd );