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
d470e688
Commit
d470e688
authored
Jul 12, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi/service: Create specific access rights for service handles.
parent
30fc5602
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
service.c
dlls/advapi32/service.c
+16
-1
No files found.
dlls/advapi32/service.c
View file @
d470e688
...
...
@@ -52,6 +52,13 @@ static const GENERIC_MAPPING scm_generic = {
SC_MANAGER_ALL_ACCESS
};
static
const
GENERIC_MAPPING
svc_generic
=
{
(
STANDARD_RIGHTS_READ
|
SERVICE_QUERY_CONFIG
|
SERVICE_QUERY_STATUS
|
SERVICE_INTERROGATE
|
SERVICE_ENUMERATE_DEPENDENTS
),
(
STANDARD_RIGHTS_WRITE
|
SERVICE_CHANGE_CONFIG
),
(
STANDARD_RIGHTS_EXECUTE
|
SERVICE_START
|
SERVICE_STOP
|
SERVICE_PAUSE_CONTINUE
|
SERVICE_USER_DEFINED_CONTROL
),
SERVICE_ALL_ACCESS
};
typedef
struct
service_start_info_t
{
DWORD
cmd
;
...
...
@@ -1234,6 +1241,7 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
HKEY
hKey
;
long
r
;
DWORD
len
;
DWORD
new_mask
=
dwDesiredAccess
;
TRACE
(
"%p %s %d
\n
"
,
hSCManager
,
debugstr_w
(
lpServiceName
),
dwDesiredAccess
);
...
...
@@ -1268,7 +1276,9 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
}
strcpyW
(
hsvc
->
name
,
lpServiceName
);
hsvc
->
hkey
=
hKey
;
hsvc
->
dwAccess
=
dwDesiredAccess
;
RtlMapGenericMask
(
&
new_mask
,
&
svc_generic
);
hsvc
->
dwAccess
=
new_mask
;
/* add reference to SCM handle */
hscm
->
hdr
.
ref_count
++
;
...
...
@@ -1298,6 +1308,7 @@ CreateServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
DWORD
dp
,
len
;
struct
reg_value
val
[
10
];
int
n
=
0
;
DWORD
new_mask
=
dwDesiredAccess
;
TRACE
(
"%p %s %s
\n
"
,
hSCManager
,
debugstr_w
(
lpServiceName
),
debugstr_w
(
lpDisplayName
));
...
...
@@ -1379,6 +1390,10 @@ CreateServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
goto
error
;
lstrcpyW
(
hsvc
->
name
,
lpServiceName
);
hsvc
->
hkey
=
hKey
;
RtlMapGenericMask
(
&
new_mask
,
&
svc_generic
);
hsvc
->
dwAccess
=
new_mask
;
hsvc
->
scm
=
hscm
;
hscm
->
hdr
.
ref_count
++
;
...
...
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