Alexandre Julliard : server: Added access rights mapping to symlink
objects.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 12 11:10:18 CST 2005
Module: wine
Branch: refs/heads/master
Commit: e57f734765c26d928be3e20b7d911c34627ef438
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e57f734765c26d928be3e20b7d911c34627ef438
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 12 15:01:16 2005 +0100
server: Added access rights mapping to symlink objects.
---
server/symlink.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/server/symlink.c b/server/symlink.c
index 62fb863..fab7c13 100644
--- a/server/symlink.c
+++ b/server/symlink.c
@@ -46,6 +46,7 @@ struct symlink
};
static void symlink_dump( struct object *obj, int verbose );
+static unsigned int symlink_map_access( struct object *obj, unsigned int access );
static struct object *symlink_lookup_name( struct object *obj, struct unicode_str *name,
unsigned int attr );
static void symlink_destroy( struct object *obj );
@@ -60,7 +61,7 @@ static const struct object_ops symlink_o
NULL, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
- no_map_access, /* map_access */
+ symlink_map_access, /* map_access */
symlink_lookup_name, /* lookup_name */
no_close_handle, /* close_handle */
symlink_destroy /* destroy */
@@ -102,6 +103,15 @@ static struct object *symlink_lookup_nam
return target;
}
+static unsigned int symlink_map_access( struct object *obj, unsigned int access )
+{
+ if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | SYMBOLIC_LINK_QUERY;
+ if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE;
+ if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE;
+ if (access & GENERIC_ALL) access |= SYMBOLIC_LINK_ALL_ACCESS;
+ return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
+}
+
static void symlink_destroy( struct object *obj )
{
struct symlink *symlink = (struct symlink *)obj;
More information about the wine-cvs
mailing list