dotnet: ModifySecurityDescriptorEx

Deprecate ModifySecurityDecriptor and introduce
ModifySecurityDescriptorEx. Works around the problem
of clobbering an existing security descriptor when the
native API FspSetSecurityDescriptor fails.
This commit is contained in:
Bill Zissimopoulos
2018-10-08 15:08:07 -07:00
parent 084f0b5b36
commit 0de00e872f
3 changed files with 66 additions and 6 deletions

View File

@ -783,10 +783,8 @@ namespace memfs
if (null != FileNode.MainFileNode)
FileNode = FileNode.MainFileNode;
FileNode.FileSecurity = ModifySecurityDescriptor(
FileNode.FileSecurity, Sections, SecurityDescriptor);
return STATUS_SUCCESS;
return ModifySecurityDescriptorEx(FileNode.FileSecurity, Sections, SecurityDescriptor,
ref FileNode.FileSecurity);
}
public override Boolean ReadDirectoryEntry(