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
4654d871
Commit
4654d871
authored
Aug 26, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Map new handle access even when not checking it.
parent
33406f51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
handle.c
server/handle.c
+15
-6
No files found.
server/handle.c
View file @
4654d871
...
@@ -235,12 +235,12 @@ static obj_handle_t alloc_entry( struct handle_table *table, void *obj, unsigned
...
@@ -235,12 +235,12 @@ static obj_handle_t alloc_entry( struct handle_table *table, void *obj, unsigned
}
}
/* allocate a handle for an object, incrementing its refcount */
/* allocate a handle for an object, incrementing its refcount */
/* return the handle, or 0 on error */
static
obj_handle_t
alloc_handle_entry
(
struct
process
*
process
,
void
*
ptr
,
obj_handle_t
alloc_handle_no_access_check
(
struct
process
*
process
,
void
*
ptr
,
unsigned
int
access
,
unsigned
int
attr
)
unsigned
int
access
,
unsigned
int
attr
)
{
{
struct
object
*
obj
=
ptr
;
struct
object
*
obj
=
ptr
;
a
ccess
&=
~
RESERVED_ALL
;
a
ssert
(
!
(
access
&
RESERVED_ALL
)
)
;
if
(
attr
&
OBJ_INHERIT
)
access
|=
RESERVED_INHERIT
;
if
(
attr
&
OBJ_INHERIT
)
access
|=
RESERVED_INHERIT
;
if
(
!
process
->
handles
)
if
(
!
process
->
handles
)
{
{
...
@@ -250,15 +250,24 @@ obj_handle_t alloc_handle_no_access_check( struct process *process, void *ptr, u
...
@@ -250,15 +250,24 @@ obj_handle_t alloc_handle_no_access_check( struct process *process, void *ptr, u
return
alloc_entry
(
process
->
handles
,
obj
,
access
);
return
alloc_entry
(
process
->
handles
,
obj
,
access
);
}
}
/* allocate a handle for an object, incrementing its refcount */
/* return the handle, or 0 on error */
obj_handle_t
alloc_handle_no_access_check
(
struct
process
*
process
,
void
*
ptr
,
unsigned
int
access
,
unsigned
int
attr
)
{
struct
object
*
obj
=
ptr
;
access
=
obj
->
ops
->
map_access
(
obj
,
access
)
&
~
RESERVED_ALL
;
return
alloc_handle_entry
(
process
,
ptr
,
access
,
attr
);
}
/* allocate a handle for an object, checking the dacl allows the process to */
/* allocate a handle for an object, checking the dacl allows the process to */
/* access it and incrementing its refcount */
/* access it and incrementing its refcount */
/* return the handle, or 0 on error */
/* return the handle, or 0 on error */
obj_handle_t
alloc_handle
(
struct
process
*
process
,
void
*
ptr
,
unsigned
int
access
,
unsigned
int
attr
)
obj_handle_t
alloc_handle
(
struct
process
*
process
,
void
*
ptr
,
unsigned
int
access
,
unsigned
int
attr
)
{
{
struct
object
*
obj
=
ptr
;
struct
object
*
obj
=
ptr
;
access
=
obj
->
ops
->
map_access
(
obj
,
access
);
access
=
obj
->
ops
->
map_access
(
obj
,
access
)
&
~
RESERVED_ALL
;
if
(
access
&&
!
check_object_access
(
obj
,
&
access
))
return
0
;
if
(
access
&&
!
check_object_access
(
obj
,
&
access
))
return
0
;
return
alloc_handle_
no_access_check
(
process
,
ptr
,
access
,
attr
);
return
alloc_handle_
entry
(
process
,
ptr
,
access
,
attr
);
}
}
/* allocate a global handle for an object, incrementing its refcount */
/* allocate a global handle for an object, incrementing its refcount */
...
@@ -539,7 +548,7 @@ obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, str
...
@@ -539,7 +548,7 @@ obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, str
res
=
src_handle
;
res
=
src_handle
;
}
}
else
else
res
=
alloc_handle_
no_access_check
(
dst
,
obj
,
access
,
attr
);
res
=
alloc_handle_
entry
(
dst
,
obj
,
access
,
attr
);
}
}
release_object
(
obj
);
release_object
(
obj
);
...
...
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