Skip to content
Snippets Groups Projects
Commit e7728c41 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard
Browse files

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

parent a684b634
No related branches found
No related tags found
No related merge requests found
......@@ -463,6 +463,25 @@ int write_process_memory( struct process *process, client_ptr_t ptr, data_size_t
set_error( STATUS_ACCESS_DENIED );
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 */
if (len > 1)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment