mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:03:12 +00:00
[SERVMAN]
GetServiceConfig: Use only the required access rights. Makes servman usable for non-admin users. svn path=/trunk/; revision=71408
This commit is contained in:
parent
0b68260492
commit
a5a8ffb511
1 changed files with 2 additions and 2 deletions
|
@ -35,12 +35,12 @@ GetServiceConfig(LPWSTR lpServiceName)
|
||||||
|
|
||||||
hSCManager = OpenSCManagerW(NULL,
|
hSCManager = OpenSCManagerW(NULL,
|
||||||
NULL,
|
NULL,
|
||||||
SC_MANAGER_ALL_ACCESS);
|
SC_MANAGER_CONNECT);
|
||||||
if (hSCManager)
|
if (hSCManager)
|
||||||
{
|
{
|
||||||
hService = OpenServiceW(hSCManager,
|
hService = OpenServiceW(hSCManager,
|
||||||
lpServiceName,
|
lpServiceName,
|
||||||
SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_QUERY_CONFIG);
|
SERVICE_QUERY_CONFIG);
|
||||||
if (hService)
|
if (hService)
|
||||||
{
|
{
|
||||||
if (!QueryServiceConfigW(hService,
|
if (!QueryServiceConfigW(hService,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue