mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 16:18:16 +00:00
hackfix some services stuff
svn path=/trunk/; revision=39411
This commit is contained in:
parent
675ba8eacc
commit
65cc369150
1 changed files with 13 additions and 5 deletions
|
@ -745,6 +745,9 @@ DWORD RQueryServiceObjectSecurity(
|
||||||
DWORD dwBytesNeeded;
|
DWORD dwBytesNeeded;
|
||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
|
|
||||||
|
SECURITY_DESCRIPTOR ObjectDescriptor;
|
||||||
|
|
||||||
DPRINT("RQueryServiceObjectSecurity() called\n");
|
DPRINT("RQueryServiceObjectSecurity() called\n");
|
||||||
|
|
||||||
hSvc = (PSERVICE_HANDLE)hService;
|
hSvc = (PSERVICE_HANDLE)hService;
|
||||||
|
@ -778,7 +781,10 @@ DWORD RQueryServiceObjectSecurity(
|
||||||
|
|
||||||
/* FIXME: Lock the service list */
|
/* FIXME: Lock the service list */
|
||||||
|
|
||||||
Status = RtlQuerySecurityObject(lpService->lpSecurityDescriptor,
|
/* hack */
|
||||||
|
Status = RtlCreateSecurityDescriptor(&ObjectDescriptor, SECURITY_DESCRIPTOR_REVISION);
|
||||||
|
|
||||||
|
Status = RtlQuerySecurityObject(&ObjectDescriptor /* lpService->lpSecurityDescriptor */,
|
||||||
dwSecurityInformation,
|
dwSecurityInformation,
|
||||||
(PSECURITY_DESCRIPTOR)lpSecurityDescriptor,
|
(PSECURITY_DESCRIPTOR)lpSecurityDescriptor,
|
||||||
cbBufSize,
|
cbBufSize,
|
||||||
|
@ -819,9 +825,9 @@ DWORD RSetServiceObjectSecurity(
|
||||||
PSERVICE_HANDLE hSvc;
|
PSERVICE_HANDLE hSvc;
|
||||||
PSERVICE lpService;
|
PSERVICE lpService;
|
||||||
ULONG DesiredAccess = 0;
|
ULONG DesiredAccess = 0;
|
||||||
HANDLE hToken = NULL;
|
/* HANDLE hToken = NULL; */
|
||||||
HKEY hServiceKey;
|
HKEY hServiceKey;
|
||||||
NTSTATUS Status;
|
/* NTSTATUS Status; */
|
||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
DPRINT1("RSetServiceObjectSecurity() called\n");
|
DPRINT1("RSetServiceObjectSecurity() called\n");
|
||||||
|
@ -875,6 +881,7 @@ DWORD RSetServiceObjectSecurity(
|
||||||
if (lpService->bDeleted)
|
if (lpService->bDeleted)
|
||||||
return ERROR_SERVICE_MARKED_FOR_DELETE;
|
return ERROR_SERVICE_MARKED_FOR_DELETE;
|
||||||
|
|
||||||
|
#if 0
|
||||||
RpcImpersonateClient(NULL);
|
RpcImpersonateClient(NULL);
|
||||||
|
|
||||||
Status = NtOpenThreadToken(NtCurrentThread(),
|
Status = NtOpenThreadToken(NtCurrentThread(),
|
||||||
|
@ -882,13 +889,12 @@ DWORD RSetServiceObjectSecurity(
|
||||||
TRUE,
|
TRUE,
|
||||||
&hToken);
|
&hToken);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return RtlNtStatusToDosError(Status);
|
return RtlNtStatusToDosError(Status);
|
||||||
|
|
||||||
RpcRevertToSelf();
|
RpcRevertToSelf();
|
||||||
|
|
||||||
/* FIXME: Lock service database */
|
/* FIXME: Lock service database */
|
||||||
|
|
||||||
#if 0
|
|
||||||
Status = RtlSetSecurityObject(dwSecurityInformation,
|
Status = RtlSetSecurityObject(dwSecurityInformation,
|
||||||
(PSECURITY_DESCRIPTOR)lpSecurityDescriptor,
|
(PSECURITY_DESCRIPTOR)lpSecurityDescriptor,
|
||||||
&lpService->lpSecurityDescriptor,
|
&lpService->lpSecurityDescriptor,
|
||||||
|
@ -917,8 +923,10 @@ DWORD RSetServiceObjectSecurity(
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (hToken != NULL)
|
if (hToken != NULL)
|
||||||
NtClose(hToken);
|
NtClose(hToken);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FIXME: Unlock service database */
|
/* FIXME: Unlock service database */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue