dll: FspEventLogRegister, FspEventLogUnregister

This commit is contained in:
Bill Zissimopoulos
2016-05-06 15:05:36 -07:00
parent 12db7cf9dc
commit 9addfa5899
4 changed files with 76 additions and 13 deletions

View File

@ -467,7 +467,11 @@ NTSTATUS FspFsctlUnregister(VOID)
DWORD LastError;
NTSTATUS Result;
ScmHandle = OpenSCManagerW(0, 0, 0);
ScmHandle = OpenSCManagerW(0, 0, SC_MANAGER_CREATE_SERVICE);
/*
* The SC_MANAGER_CREATE_SERVICE access right is not strictly needed here,
* but we use it to enforce admin rights.
*/
if (0 == ScmHandle)
{
Result = FspNtStatusFromWin32(GetLastError());