Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5953851b
Commit
5953851b
authored
Jan 16, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Fix generic access mapping for an event.
parent
ea765ae0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
security.c
dlls/advapi32/tests/security.c
+6
-10
event.c
server/event.c
+4
-4
No files found.
dlls/advapi32/tests/security.c
View file @
5953851b
...
@@ -4600,14 +4600,14 @@ static void test_event_security(HANDLE token)
...
@@ -4600,14 +4600,14 @@ static void test_event_security(HANDLE token)
STANDARD_RIGHTS_ALL
|
EVENT_ALL_ACCESS
};
STANDARD_RIGHTS_ALL
|
EVENT_ALL_ACCESS
};
static
const
struct
static
const
struct
{
{
int
todo
,
generic
,
mapped
;
int
generic
,
mapped
;
}
map
[]
=
}
map
[]
=
{
{
{
0
,
0
,
0
},
{
0
,
0
},
{
1
,
GENERIC_READ
,
STANDARD_RIGHTS_READ
|
EVENT_QUERY_STATE
},
{
GENERIC_READ
,
STANDARD_RIGHTS_READ
|
EVENT_QUERY_STATE
},
{
1
,
GENERIC_WRITE
,
STANDARD_RIGHTS_WRITE
|
EVENT_MODIFY_STATE
},
{
GENERIC_WRITE
,
STANDARD_RIGHTS_WRITE
|
EVENT_MODIFY_STATE
},
{
1
,
GENERIC_EXECUTE
,
STANDARD_RIGHTS_EXECUTE
|
SYNCHRONIZE
},
{
GENERIC_EXECUTE
,
STANDARD_RIGHTS_EXECUTE
|
SYNCHRONIZE
},
{
0
,
GENERIC_ALL
,
STANDARD_RIGHTS_ALL
|
EVENT_QUERY_STATE
|
EVENT_MODIFY_STATE
}
{
GENERIC_ALL
,
STANDARD_RIGHTS_ALL
|
EVENT_QUERY_STATE
|
EVENT_MODIFY_STATE
}
};
};
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -4630,10 +4630,6 @@ static void test_event_security(HANDLE token)
...
@@ -4630,10 +4630,6 @@ static void test_event_security(HANDLE token)
ok
(
ret
,
"DuplicateHandle error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"DuplicateHandle error %d
\n
"
,
GetLastError
());
access
=
get_obj_access
(
dup
);
access
=
get_obj_access
(
dup
);
if
(
map
[
i
].
todo
)
todo_wine
ok
(
access
==
map
[
i
].
mapped
,
"%d: expected %#x, got %#x
\n
"
,
i
,
map
[
i
].
mapped
,
access
);
else
ok
(
access
==
map
[
i
].
mapped
,
"%d: expected %#x, got %#x
\n
"
,
i
,
map
[
i
].
mapped
,
access
);
ok
(
access
==
map
[
i
].
mapped
,
"%d: expected %#x, got %#x
\n
"
,
i
,
map
[
i
].
mapped
,
access
);
CloseHandle
(
dup
);
CloseHandle
(
dup
);
...
...
server/event.c
View file @
5953851b
...
@@ -183,10 +183,10 @@ static void event_satisfied( struct object *obj, struct wait_queue_entry *entry
...
@@ -183,10 +183,10 @@ static void event_satisfied( struct object *obj, struct wait_queue_entry *entry
static
unsigned
int
event_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
static
unsigned
int
event_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
{
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
SYNCHRONIZE
|
EVENT_QUERY_STATE
;
if
(
access
&
GENERIC_READ
)
access
|=
STANDARD_RIGHTS_READ
|
EVENT_QUERY_STATE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
;
if
(
access
&
GENERIC_WRITE
)
access
|=
STANDARD_RIGHTS_WRITE
|
EVENT_MODIFY_STATE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
;
if
(
access
&
GENERIC_EXECUTE
)
access
|=
STANDARD_RIGHTS_EXECUTE
|
SYNCHRONIZE
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_ALL
|
EVENT_
ALL_ACCESS
;
if
(
access
&
GENERIC_ALL
)
access
|=
STANDARD_RIGHTS_ALL
|
EVENT_
QUERY_STATE
|
EVENT_MODIFY_STATE
;
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
return
access
&
~
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
);
}
}
...
...
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