Commit e7728c41 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

server: Try writing to /proc/<pid>/mem in write_process_memory().

parent a684b634
...@@ -463,6 +463,25 @@ int write_process_memory( struct process *process, client_ptr_t ptr, data_size_t ...@@ -463,6 +463,25 @@ int write_process_memory( struct process *process, client_ptr_t ptr, data_size_t
set_error( STATUS_ACCESS_DENIED ); set_error( STATUS_ACCESS_DENIED );
goto done; goto done;
} }
if (len > 3)
{
char procmem[24];
int fd;
sprintf( procmem, "/proc/%u/mem", process->unix_pid );
if ((fd = open( procmem, O_WRONLY )) != -1)
{
ssize_t r = pwrite( fd, src, size, ptr );
close( fd );
if (r == size)
{
ret = 1;
goto done;
}
}
}
/* first word is special */ /* first word is special */
if (len > 1) if (len > 1)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment