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
e0206d9f
Commit
e0206d9f
authored
Jul 17, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make returning used privileges optional in token_access_check.
parent
80cee36b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
token.c
server/token.c
+6
-7
No files found.
server/token.c
View file @
e0206d9f
...
...
@@ -848,7 +848,7 @@ static unsigned int token_access_check( struct token *token,
/* fail if desired_access contains generic rights */
if
(
desired_access
&
(
GENERIC_READ
|
GENERIC_WRITE
|
GENERIC_EXECUTE
|
GENERIC_ALL
))
{
*
priv_count
=
0
;
if
(
priv_count
)
*
priv_count
=
0
;
return
STATUS_GENERIC_NOT_MAPPED
;
}
...
...
@@ -856,14 +856,14 @@ static unsigned int token_access_check( struct token *token,
owner
=
sd_get_owner
(
sd
);
if
(
!
owner
||
!
sd_get_group
(
sd
))
{
*
priv_count
=
0
;
if
(
priv_count
)
*
priv_count
=
0
;
return
STATUS_INVALID_SECURITY_DESCR
;
}
/* 1: Grant desired access if the object is unprotected */
if
(
!
dacl_present
||
!
dacl
)
{
*
priv_count
=
0
;
if
(
priv_count
)
*
priv_count
=
0
;
*
granted_access
=
desired_access
;
return
*
status
=
STATUS_SUCCESS
;
}
...
...
@@ -899,7 +899,7 @@ static unsigned int token_access_check( struct token *token,
}
else
{
*
priv_count
=
0
;
if
(
priv_count
)
*
priv_count
=
0
;
*
status
=
STATUS_PRIVILEGE_NOT_HELD
;
return
STATUS_SUCCESS
;
}
...
...
@@ -1002,8 +1002,7 @@ int check_object_access(struct object *obj, unsigned int *access)
{
GENERIC_MAPPING
mapping
;
struct
token
*
token
=
current
->
token
?
current
->
token
:
current
->
process
->
token
;
LUID_AND_ATTRIBUTES
priv
;
unsigned
int
status
,
priv_count
=
1
;
unsigned
int
status
;
int
res
;
mapping
.
GenericAll
=
obj
->
ops
->
map_access
(
obj
,
GENERIC_ALL
);
...
...
@@ -1019,7 +1018,7 @@ int check_object_access(struct object *obj, unsigned int *access)
mapping
.
GenericWrite
=
obj
->
ops
->
map_access
(
obj
,
GENERIC_WRITE
);
mapping
.
GenericExecute
=
obj
->
ops
->
map_access
(
obj
,
GENERIC_EXECUTE
);
res
=
token_access_check
(
token
,
obj
->
sd
,
*
access
,
&
priv
,
&
priv_count
,
res
=
token_access_check
(
token
,
obj
->
sd
,
*
access
,
NULL
,
NULL
,
&
mapping
,
access
,
&
status
)
==
STATUS_SUCCESS
&&
status
==
STATUS_SUCCESS
;
...
...
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