mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 19:27:17 +00:00
services: Fix access adjustment by reordering code (Clang).
Signed-off-by: André Hentschel <nerv@dawncrow.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ded403c4f3
commit
67e5e8edf6
|
@ -352,12 +352,13 @@ static DWORD create_handle_for_service(struct service_entry *entry, DWORD dwDesi
|
||||||
return ERROR_NOT_ENOUGH_SERVER_MEMORY;
|
return ERROR_NOT_ENOUGH_SERVER_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dwDesiredAccess & MAXIMUM_ALLOWED)
|
||||||
|
dwDesiredAccess |= SERVICE_ALL_ACCESS;
|
||||||
|
|
||||||
service->hdr.type = SC_HTYPE_SERVICE;
|
service->hdr.type = SC_HTYPE_SERVICE;
|
||||||
service->hdr.access = dwDesiredAccess;
|
service->hdr.access = dwDesiredAccess;
|
||||||
RtlMapGenericMask(&service->hdr.access, &g_svc_generic);
|
RtlMapGenericMask(&service->hdr.access, &g_svc_generic);
|
||||||
service->service_entry = entry;
|
service->service_entry = entry;
|
||||||
if (dwDesiredAccess & MAXIMUM_ALLOWED)
|
|
||||||
dwDesiredAccess |= SERVICE_ALL_ACCESS;
|
|
||||||
|
|
||||||
*phService = &service->hdr;
|
*phService = &service->hdr;
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue