pub fn ConvertStringSecurityDescriptorToSecurityDescriptor<S: AsRef<OsStr> + ?Sized>(
string: &S,
) -> Result<LocalBox<SecurityDescriptor>>Expand description
Wraps ConvertStringSecurityDescriptorToSecurityDescriptorW.
Always uses SDDL_REVISION_1.
It may be more convenient to use str::parse or one of the other wrappers
enabled because FromStr is implemented on
LocalBox<SecurityDescriptor>.
use windows_permissions::wrappers::ConvertStringSecurityDescriptorToSecurityDescriptor;
let string_sd = "G:S-1-5-10-20";
let sd = ConvertStringSecurityDescriptorToSecurityDescriptor(string_sd).unwrap();
assert_eq!(string_sd, &sd.as_sddl().unwrap());