diff options
Diffstat (limited to 'zenutil/zenserverprocess.cpp')
| -rw-r--r-- | zenutil/zenserverprocess.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/zenutil/zenserverprocess.cpp b/zenutil/zenserverprocess.cpp index c6bee1ed7..9e370ae10 100644 --- a/zenutil/zenserverprocess.cpp +++ b/zenutil/zenserverprocess.cpp @@ -40,20 +40,16 @@ namespace zenutil { m_Attributes.nLength = sizeof m_Attributes; m_Attributes.bInheritHandle = false; // Disable inheritance - const BOOL success = InitializeSecurityDescriptor(&m_Sd, SECURITY_DESCRIPTOR_REVISION); + const BOOL Success = InitializeSecurityDescriptor(&m_Sd, SECURITY_DESCRIPTOR_REVISION); - if (success) + if (Success) { - const BOOL bSetOk = SetSecurityDescriptorDacl(&m_Sd, TRUE, (PACL)NULL, FALSE); - - if (bSetOk) - { - m_Attributes.lpSecurityDescriptor = &m_Sd; - } - else + if (!SetSecurityDescriptorDacl(&m_Sd, TRUE, (PACL)NULL, FALSE)) { zen::ThrowLastError("SetSecurityDescriptorDacl failed", std::source_location::current()); } + + m_Attributes.lpSecurityDescriptor = &m_Sd; } } }; |