30 const std::string &title)
32 sa.nLength =
sizeof(SECURITY_ATTRIBUTES);
33 sa.bInheritHandle = inherit ? TRUE : FALSE;
34 sa.lpSecurityDescriptor =
nullptr;
35 if (!sddl_string.empty())
37 if (!::ConvertStringSecurityDescriptorToSecurityDescriptorA(
40 &
sa.lpSecurityDescriptor,
44 OPENVPN_THROW(win_sec_attr,
"failed to create security descriptor for " << title <<
" : " << err.message());