Alexandre Julliard : server: Added access rights mapping to token
objects.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 12 11:10:18 CST 2005
Module: wine
Branch: refs/heads/master
Commit: 5fb2e68bb24d2b82a28e4a389d8f80f20c5600ae
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=5fb2e68bb24d2b82a28e4a389d8f80f20c5600ae
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 12 15:01:08 2005 +0100
server: Added access rights mapping to token objects.
---
server/token.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/server/token.c b/server/token.c
index 11b1f11..53bbc13 100644
--- a/server/token.c
+++ b/server/token.c
@@ -106,6 +106,7 @@ struct sid_and_attributes
};
static void token_dump( struct object *obj, int verbose );
+static unsigned int token_map_access( struct object *obj, unsigned int access );
static void token_destroy( struct object *obj );
static const struct object_ops token_ops =
@@ -118,7 +119,7 @@ static const struct object_ops token_ops
NULL, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
- no_map_access, /* map_access */
+ token_map_access, /* map_access */
no_lookup_name, /* lookup_name */
no_close_handle, /* close_handle */
token_destroy /* destroy */
@@ -131,6 +132,15 @@ static void token_dump( struct object *o
/* FIXME: dump token members */
}
+static unsigned int token_map_access( struct object *obj, unsigned int access )
+{
+ if (access & GENERIC_READ) access |= TOKEN_READ;
+ if (access & GENERIC_WRITE) access |= TOKEN_WRITE;
+ if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE;
+ if (access & GENERIC_ALL) access |= TOKEN_ALL_ACCESS;
+ return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
+}
+
static SID *security_sid_alloc( const SID_IDENTIFIER_AUTHORITY *idauthority, int subauthcount, const unsigned int subauth[] )
{
int i;
More information about the wine-cvs
mailing list