Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
4654d871
Commit
4654d871
authored
11 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
server: Map new handle access even when not checking it.
parent
33406f51
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/handle.c
+15
-6
15 additions, 6 deletions
server/handle.c
with
15 additions
and
6 deletions
server/handle.c
+
15
−
6
View file @
4654d871
...
...
@@ -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 */
/* 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
)
static
obj_handle_t
alloc_handle_entry
(
struct
process
*
process
,
void
*
ptr
,
unsigned
int
access
,
unsigned
int
attr
)
{
struct
object
*
obj
=
ptr
;
access
&
=
~
RESERVED_ALL
;
assert
(
!
(
access
&
RESERVED_ALL
)
)
;
if
(
attr
&
OBJ_INHERIT
)
access
|=
RESERVED_INHERIT
;
if
(
!
process
->
handles
)
{
...
...
@@ -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
);
}
/* 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 */
/* access it and incrementing its refcount */
/* return the handle, or 0 on error */
obj_handle_t
alloc_handle
(
struct
process
*
process
,
void
*
ptr
,
unsigned
int
access
,
unsigned
int
attr
)
{
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
;
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 */
...
...
@@ -539,7 +548,7 @@ obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, str
res
=
src_handle
;
}
else
res
=
alloc_handle_
no_access_check
(
dst
,
obj
,
access
,
attr
);
res
=
alloc_handle_
entry
(
dst
,
obj
,
access
,
attr
);
}
release_object
(
obj
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment