services: Make svcctl_{Lock, Unlock}ServiceDatabase() into a no-op.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-04-27 22:35:33 -05:00 committed by Alexandre Julliard
parent 529b07ee11
commit c0977fcbec
1 changed files with 6 additions and 38 deletions

View File

@ -1365,55 +1365,23 @@ DWORD __cdecl svcctl_CloseServiceHandle(
return ERROR_SUCCESS;
}
static void SC_RPC_LOCK_destroy(SC_RPC_LOCK hLock)
{
struct sc_lock *lock = hLock;
scmdatabase_unlock_startup(lock->db);
HeapFree(GetProcessHeap(), 0, lock);
}
void __RPC_USER SC_RPC_LOCK_rundown(SC_RPC_LOCK hLock)
{
SC_RPC_LOCK_destroy(hLock);
}
DWORD __cdecl svcctl_LockServiceDatabase(
SC_RPC_HANDLE hSCManager,
SC_RPC_LOCK *phLock)
DWORD __cdecl svcctl_LockServiceDatabase(SC_RPC_HANDLE manager, SC_RPC_LOCK *lock)
{
struct sc_manager_handle *manager;
struct sc_lock *lock;
DWORD err;
WINE_TRACE("(%p, %p)\n", hSCManager, phLock);
if ((err = validate_scm_handle(hSCManager, SC_MANAGER_LOCK, &manager)) != ERROR_SUCCESS)
return err;
if (!scmdatabase_lock_startup(manager->db, 0))
return ERROR_SERVICE_DATABASE_LOCKED;
lock = HeapAlloc(GetProcessHeap(), 0, sizeof(struct sc_lock));
if (!lock)
{
scmdatabase_unlock_startup(manager->db);
return ERROR_NOT_ENOUGH_SERVER_MEMORY;
}
lock->db = manager->db;
*phLock = lock;
TRACE("(%p, %p)\n", manager, lock);
*lock = (SC_RPC_LOCK)0xdeadbeef;
return ERROR_SUCCESS;
}
DWORD __cdecl svcctl_UnlockServiceDatabase(
SC_RPC_LOCK *phLock)
DWORD __cdecl svcctl_UnlockServiceDatabase(SC_RPC_LOCK *lock)
{
WINE_TRACE("(&%p)\n", *phLock);
SC_RPC_LOCK_destroy(*phLock);
*phLock = NULL;
TRACE("(&%p)\n", *lock);
*lock = NULL;
return ERROR_SUCCESS;
}