Commit Graph

97 Commits

Author SHA1 Message Date
Andrew Eikum b29157e101 services: Fix reading past end of struct (Coverity).
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 16:24:47 +01:00
Andrew Eikum 73e8d0e6a5 services: Add support for service status change notifications.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 18:28:38 +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
Bernhard Übelacker de7220e255 advapi32: Fix ChangeServiceConfig2 when given a null description.
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-12 19:41:06 +02:00
Jacek Caban 69608af0a9 services: Call RpcMgmtWaitServerListen in RPC_Stop.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 19:59:30 +02:00
Sebastian Lackner f628cbbaa1 services: Add a separate winedevice service for each kernel driver.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-01 21:21:29 +09: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 bc8f74f92f services: Remove synchronization for CloseThreadpoolCleanupGroupMembers.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-22 12:51:30 +09:00
Sebastian Lackner 039471ec37 services: Allocate a separate status_changed_event for each service.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-19 15:31:43 +09:00
Sebastian Lackner 9dfa1022e9 services: Use threadpool API instead of custom wait implementation.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:38:14 +09:00
Sebastian Lackner 4c01feb714 services: Hold startup lock before calling service_start.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:38:14 +09:00
Sebastian Lackner 36ccc45db6 services: Track number of services per process.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:38:13 +09:00
Sebastian Lackner b08ce1ae80 services: WaitForSingleObject returns a DWORD result.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:38:13 +09:00
Sebastian Lackner 46a974856f services: Add a grab_service function.
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 cafcf6448f services: Remove service_terminate function.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 14:45:04 +09:00
Sebastian Lackner 5137bfd4ba services: Ignore error in callback only for ControlService requests.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 14:44:50 +09:00
Sebastian Lackner fac8ec9389 services: Unlink process immediately after service stopped.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 14:44:30 +09:00
Sebastian Lackner 46b2746938 services: Store process id in the process object.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 14:43:25 +09:00
Sebastian Lackner cbc5de1c5f services: Fix handling of user defined service controls.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 22:25:09 +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 5f2b96b859 services: Preparation to allow arbitrary data in service RPC messages.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 16:16:04 +09:00
Sebastian Lackner 37097ce95c services: Track services and processes separately.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 16:25:58 +09:00
Sebastian Lackner 168af6e750 services: Hold a reference to process in svcctl_ControlService.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 21:06:11 +09:00
Sebastian Lackner fa593d4d87 services: Pass a process argument to send_control function.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 21:59:42 +09:00
Sebastian Lackner 7fc3107b4c services: Initialize service ref_count directly in service_create.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 21:59:41 +09:00
Sebastian Lackner 7fc3f72de7 services: Move process related fields into a separate struct.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 15:26:59 +09:00
Sebastian Lackner 00b1184f10 services: Store a separate variable instead of clearing control_mutex.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 15:26:57 +09:00
Sebastian Lackner 6780c20342 services: Fix calculation of service timeout.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:29:02 +09:00
Sebastian Lackner 4931f5fbe9 services: Get rid of unnecessary locks.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:29:00 +09:00
Sebastian Lackner 34fd639801 services: Do not distinguish between shared/exclusive lock.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:28:58 +09:00
Sebastian Lackner 0819c739ec services: Remove pipe argument from service_send_command function.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:28:55 +09:00
Sebastian Lackner 20633b292b services: Consistently use InterlockedIncrement to increment refcount.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:28:53 +09:00
André Hentschel 67e5e8edf6 services: Fix access adjustment by reordering code (Clang).
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 11:59:20 +01:00
Nikolay Sivov ebbb8fa5da services: Fix GetNotifyResults() prototype. 2015-03-05 21:17:56 +09:00
Francois Gouget 123cfee93c services: Fix compilation on systems that don't support nameless unions. 2015-03-02 13:49:13 +09:00
Nikolay Sivov 1896064332 services: Mark WOW64 services in registry. 2015-02-27 14:20:25 +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
Andrew Eikum 1e783dbfaa services: Monitor process handles for process quit. 2015-02-26 23:04:55 +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 6a4c146962 services: Defer service delete until all handles are closed. 2014-06-12 18:24:17 +02:00
Francois Gouget cbeae4ca3d services: Fix compilation on systems that don't support nameless unions. 2012-10-29 10:41:16 +01:00
Piotr Caban 522bc15b45 services: Kill service thread after timeout so it can terminate cleanly. 2012-10-22 16:19:53 +02:00
Jacek Caban cea783ddda services: Fixed memory leak. 2012-10-09 16:12:30 +02:00
Francois Gouget fac36c55e9 Assorted typo, spelling, wording and case fixes. 2012-05-15 16:26:43 +02:00
Piotr Caban c21ede4474 services: Terminate service when its status is set to SERVICE_STOPPED. 2011-12-12 15:50:41 +01:00
Piotr Caban 01ef66cb1e services: Move service cleanup code to separate function. 2011-12-12 15:50:40 +01:00