server: Specify the access rights when creating a mapping object.

Dmitry Timoshkov dmitry at baikal.ru
Thu Jan 12 03:30:57 CST 2012


While investigating how to fix the file section access tests in kernel32 I've
found that some places in Wine deliberately create objects with access rights
set to 0, that leads to creation of potentially not accessible objects.

---
 server/mapping.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/mapping.c b/server/mapping.c
index f37016f..5b126de 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -719,7 +719,7 @@ DECL_HANDLER(get_mapping_info)
         if ((fd = get_obj_fd( &mapping->obj )))
         {
             if (!is_fd_removable(fd))
-                reply->mapping = alloc_handle( current->process, mapping, 0, 0 );
+                reply->mapping = alloc_handle( current->process, mapping, GENERIC_READ|GENERIC_WRITE, 0 );
             release_object( fd );
         }
         if (mapping->shared_file)
-- 
1.7.7.4




More information about the wine-patches mailing list