Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e612bd41
Commit
e612bd41
authored
Jan 18, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add generic access mapping for winstation and desktop objects.
parent
aa3165fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
winstation.c
server/winstation.c
+26
-2
No files found.
server/winstation.c
View file @
e612bd41
...
...
@@ -46,9 +46,11 @@ static struct namespace *winstation_namespace;
static
void
winstation_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
winstation_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
);
static
void
winstation_destroy
(
struct
object
*
obj
);
static
unsigned
int
winstation_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
void
desktop_dump
(
struct
object
*
obj
,
int
verbose
);
static
int
desktop_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
);
static
void
desktop_destroy
(
struct
object
*
obj
);
static
unsigned
int
desktop_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
const
struct
object_ops
winstation_ops
=
{
...
...
@@ -60,7 +62,7 @@ static const struct object_ops winstation_ops =
NULL
,
/* satisfied */
no_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
winstation_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
winstation_close_handle
,
/* close_handle */
winstation_destroy
/* destroy */
...
...
@@ -77,7 +79,7 @@ static const struct object_ops desktop_ops =
NULL
,
/* satisfied */
no_signal
,
/* signal */
no_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
desktop_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
desktop_close_handle
,
/* close_handle */
desktop_destroy
/* destroy */
...
...
@@ -139,6 +141,17 @@ static void winstation_destroy( struct object *obj )
if
(
winstation
->
atom_table
)
release_object
(
winstation
->
atom_table
);
}
static
unsigned
int
winstation_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
WINSTA_ENUMDESKTOPS
|
WINSTA_READATTRIBUTES
|
WINSTA_ENUMERATE
|
WINSTA_READSCREEN
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
|
WINSTA_ACCESSCLIPBOARD
|
WINSTA_CREATEDESKTOP
|
WINSTA_WRITEATTRIBUTES
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
|
WINSTA_ACCESSGLOBALATOMS
|
WINSTA_EXITWINDOWS
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_REQUIRED
|
WINSTA_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
/* retrieve the process window station, checking the handle access rights */
struct
winstation
*
get_process_winstation
(
struct
process
*
process
,
unsigned
int
access
)
{
...
...
@@ -239,6 +252,17 @@ static void desktop_destroy( struct object *obj )
release_object
(
desktop
->
winstation
);
}
static
unsigned
int
desktop_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
DESKTOP_READOBJECTS
|
DESKTOP_ENUMERATE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
|
DESKTOP_CREATEMENU
|
DESKTOP_CREATEWINDOW
|
DESKTOP_HOOKCONTROL
|
DESKTOP_JOURNALRECORD
|
DESKTOP_JOURNALPLAYBACK
|
DESKTOP_WRITEOBJECTS
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
|
DESKTOP_SWITCHDESKTOP
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_REQUIRED
|
DESKTOP_ALL_ACCESS
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
/* retrieve the thread desktop, checking the handle access rights */
struct
desktop
*
get_thread_desktop
(
struct
thread
*
thread
,
unsigned
int
access
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment