Skip to content

Commit

Permalink
OrcLib: JobObject: improve log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienfl-orc committed Nov 9, 2020
1 parent e94897e commit 7a78990
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/OrcLib/JobObject.cpp
Expand Up @@ -60,15 +60,13 @@ JobObject::GetHandle(DWORD dwSourcePid, HANDLE hSourceHandle, DWORD dwDesiredAcc
PSID pMySid = NULL;
if (FAILED(hr = GetMyCurrentSID(pMySid)))
{
hr = HRESULT_FROM_WIN32(GetLastError());
Log::Debug("Failed to take ownership of handle (code: {:#x})", hr);
Log::Debug("Failed to get current user SID (code: {:#x})", hr);
}
else
{
if (FAILED(hr = ::GrantAccess(SE_KERNEL_OBJECT, hSourceHandle, pMySid, dwDesiredAccess)))
{
hr = HRESULT_FROM_WIN32(GetLastError());
Log::Debug("Failed to take ownership of handle (code: {:#x})", hr);
Log::Debug("Failed to grant access to source handle (code: {:#x})", hr);
}
else
{
Expand Down

0 comments on commit 7a78990

Please sign in to comment.