def security_descriptor(include_sacl = false)
security_information = Chef::ReservedNames::Win32::API::Security::OWNER_SECURITY_INFORMATION | Chef::ReservedNames::Win32::API::Security::GROUP_SECURITY_INFORMATION | Chef::ReservedNames::Win32::API::Security::DACL_SECURITY_INFORMATION
if include_sacl
security_information |= Chef::ReservedNames::Win32::API::Security::SACL_SECURITY_INFORMATION
Security.with_privileges("SeSecurityPrivilege") do
Security.get_named_security_info(path, type, security_information)
end
else
Security.get_named_security_info(path, type, security_information)
end
end