Alexandre Julliard : server: Added access rights mapping to registry
key objects.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 12 11:10:18 CST 2005
Module: wine
Branch: refs/heads/master
Commit: 32a93960babeedcd48f9e20afe41b7b019dc2ff0
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=32a93960babeedcd48f9e20afe41b7b019dc2ff0
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 12 15:02:26 2005 +0100
server: Added access rights mapping to registry key objects.
---
server/registry.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/server/registry.c b/server/registry.c
index 52b4c19..09c7f5a 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -134,6 +134,7 @@ struct file_load_info
static void key_dump( struct object *obj, int verbose );
+static unsigned int key_map_access( struct object *obj, unsigned int access );
static int key_close_handle( struct object *obj, struct process *process, obj_handle_t handle );
static void key_destroy( struct object *obj );
@@ -147,7 +148,7 @@ static const struct object_ops key_ops =
NULL, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
- no_map_access, /* map_access */
+ key_map_access, /* map_access */
no_lookup_name, /* lookup_name */
key_close_handle, /* close_handle */
key_destroy /* destroy */
@@ -301,6 +302,15 @@ static inline struct notify *find_notify
return NULL;
}
+static unsigned int key_map_access( struct object *obj, unsigned int access )
+{
+ if (access & GENERIC_READ) access |= KEY_READ;
+ if (access & GENERIC_WRITE) access |= KEY_WRITE;
+ if (access & GENERIC_EXECUTE) access |= KEY_EXECUTE;
+ if (access & GENERIC_ALL) access |= KEY_ALL_ACCESS;
+ return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
+}
+
/* close the notification associated with a handle */
static int key_close_handle( struct object *obj, struct process *process, obj_handle_t handle )
{
More information about the wine-cvs
mailing list