Function svcctl_QueryServiceConfigW already checked for this permission, so make sense that QueryServiceConfig2W should as well.
MSDN states "This handle is returned by the OpenService or CreateService function and must have the SERVICE_QUERY_CONFIG access right"
Patch by Bugzilla user Dalai.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50412
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- programs/services/rpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/services/rpc.c b/programs/services/rpc.c index 8d688c2f904..0f0a83df421 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -979,7 +979,7 @@ DWORD __cdecl svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
memset(buffer, 0, size);
- if ((err = validate_service_handle(hService, SERVICE_QUERY_STATUS, &service)) != 0) + if ((err = validate_service_handle(hService, SERVICE_QUERY_CONFIG, &service)) != 0) return err;
switch (level)