Commit Graph

271 Commits

Author SHA1 Message Date
Eric Pouech 7e39b60a69 advapi32: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 10:45:56 +01:00
Michael Stefaniuc d6c4efec1a advapi32: Remove superfluous cast to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:45:37 +02:00
Alexandre Julliard c487f21b6b advapi32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Zebediah Figura 9a4bf42e4b advapi32: Move service functions into sechost.
Based on a patch by Micah N Gorrell.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 10:25:08 +02:00
Zebediah Figura d01f58a3f2 advapi32: Reimplement EnumServicesStatusW() on top of EnumServicesStatusExW().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:47 +02:00
Zebediah Figura 529b07ee11 advapi32: Make {Lock, Unlock}ServiceDatabase() into a no-op.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:42 +02:00
Micah N Gorrell 714b2219b8 advapi32: Replace SERV_dup() with strdupAW().
Signed-off-by: Micah N Gorrell <mgorrell@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:40 +02:00
Micah N Gorrell 2f2074a5a0 advapi32: Replace usage of internal SERV_ functions with exported functions.
Signed-off-by: Micah N Gorrell <mgorrell@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:38 +02:00
Michael Stefaniuc dc235ab4a7 advapi32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 20:32:11 +01:00
Alex Henrie c296a21cdb advapi32: Fix memory leak in QueryServiceConfig2W (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 21:04:04 +01:00
Zebediah Figura 3b8ec3046a advapi32: Correctly translate SERVICE_REQUIRED_PRIVILEGES_INFO to RPC.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-14 10:11:21 +02:00
Jacek Caban 269dbdcfbf advapi32: Initialize svcctl_GetNotifyResults output parameter to NULL.
Otherwise rpcrt4 treats its uninitialized value as output buffer.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-09 09:56:08 +02:00
Andrew Eikum e5294a7414 advapi32: Also wait on services without a control thread during shutdown.
Tested service messages during OS shutdown manually on Windows 7.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 19:39:12 +01:00
Andrew Eikum 1f88b90b74 advapi32: Implement NotifyServiceStatusChange.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 18:28:38 +01:00
Andrew Eikum 9c95bfcc30 advapi: Fix return value for QueryServiceConfig2W.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-03 23:27:06 +01:00
Hans Leidekker 251c9ccff7 advapi32: Fix QueryServiceConfig2 on Wow64.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 21:06:52 +01:00
Hans Leidekker 445996d31b advapi32: Fix EnumServicesStatusEx on Wow64.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 21:06:48 +01:00
Hans Leidekker ac0744d450 advapi32: Fix EnumServicesStatus on Wow64.
The structures returned by this function contain pointers, which breaks on Wow64 if
the client is 32-bit (the service manager always runs in a 64-bit process).

This patch introduces a variant of ENUM_SERVICE_STATUS with offsets instead of pointers
and converts the structures on the client side.

The downside is that we need to buffer the data, but in return we can get rid of the
dummy buffer pointer.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 21:06:40 +01:00
Austin English e2283db410 advapi32: Only show NotifyServiceStatusChangeW FIXME once.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 09:22:43 +02:00
Sebastian Lackner 1c5affa205 advapi32: Unify service startup and control handling.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-31 22:22:59 +09:00
Sebastian Lackner 2263baaf2e advapi32: Do not stop service main thread as long as there are still running services.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00
Sebastian Lackner 13bb213aeb advapi32: Hold lock while handling service thread shutdown.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00
Sebastian Lackner 63c36da6da advapi32: Hold lock while processing service controls.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00
Sebastian Lackner f4590e91eb advapi32: Simplify RegisterServiceCtrlHandlerExW.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:36 +09:00
Sebastian Lackner 8f8626feef services: Implement functionality to transfer extra data when sending service control.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 16:17:29 +09:00
Sebastian Lackner 7a200887bb advapi32: Validate received service name.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 16:16:49 +09:00
Francois Gouget fbc5935764 advapi32: Fix compilation on systems that don't support nameless unions. 2015-03-02 13:48:57 +09:00
Nikolay Sivov daf0af4313 advapi32: Forward to CreateServiceWOW64W() when appropriate. 2015-02-27 14:20:25 +09:00
Nikolay Sivov 0f80d4b619 services: Make RPC interface compatible with native. 2015-02-27 14:20:24 +09:00
Nikolay Sivov 7520297a49 advapi32: Fix trace format for access mask in OpenService(). 2015-02-27 14:20:23 +09:00
Andrew Eikum afa965a152 advapi32: Partially implement NotifyServiceStatusChangeW. 2015-02-26 23:05:12 +09:00
Nikolay Sivov c0b0d3b4e2 services: Pass resume index to server. 2015-02-25 20:35:23 +09:00
Nikolay Sivov 3c186a65d3 services: Make ChangeServiceConfig2W() rpc call compatible with native one. 2015-02-25 20:35:23 +09:00
Nikolay Sivov 65a468ef74 advapi32: Use heap* helpers in service code. 2014-08-25 10:54:50 +02:00
Nikolay Sivov 6a4c146962 services: Defer service delete until all handles are closed. 2014-06-12 18:24:17 +02:00
André Hentschel 929d9fb9f7 advapi32: Use boolean return values in boolean functions. 2014-02-04 11:15:18 +01:00
Alexander Morozov a792a5b486 advapi32: Do not terminate a regular program if it calls StartServiceCtrlDispatcher. 2013-04-02 15:03:29 +02:00
Jimmy Rentz c61df08543 advapi32: Fix segfault in OpenService. 2013-03-25 16:21:17 +01:00
Erich Hoover 08238b83b8 advapi32: Support service objects in GetNamedSecurityInfo. 2013-01-31 12:08:59 +01:00
Erich Hoover e4717c299e advapi32: Support service objects in SetSecurityInfo. 2013-01-30 13:07:38 +01:00
Erich Hoover 331b99cf19 advapi32: Support service objects in GetSecurityInfo. 2012-12-14 12:25:57 +01:00
Piotr Caban 8ebf0a72c9 advapi32: Don't terminate service when its last thread has exited. 2012-10-22 15:17:51 +02:00
Piotr Caban a936b58b8b advapi32: Return from StartServiceCtrlDispatcher when service status is changed to stopped. 2012-10-22 15:17:44 +02:00
Piotr Caban 6027fe2daf advapi32: Validate arguments in StartServiceCtrlDispatcher. 2012-10-22 15:17:39 +02:00
Marcus Meissner aaabec2b33 advapi32: Avoid memory leak on pipe read failure (Coverity). 2012-10-03 18:16:48 +02:00
Andrew Eikum ac615a7e9a advapi32: Consolidate helper function. 2012-09-14 12:03:01 +02:00
Jacek Caban 52363aef65 advapi32: Pass service name as argv[0] to ServiceMain. 2012-06-15 18:35:42 +02:00
Alexander Morozov 6d6e6600ef advapi32: Regular program should not freeze forever if it calls StartServiceCtrlDispatcher. 2012-04-04 19:15:26 +02:00
Alistair Leslie-Hughes 77b9d58556 advapi32: Assign a default value (clang). 2012-03-16 13:02:51 +01:00
Piotr Caban e849691fcc advapi32: Send shutdown notification to services. 2011-11-30 16:34:05 +01:00