Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@ -0,0 +1,76 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.IO.FileSystem.AccessControl.Tests", "tests\System.IO.FileSystem.AccessControl.Tests.csproj", "{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}"
ProjectSection(ProjectDependencies) = postProject
{D77FBA6C-1AA6-45A4-93E2-97A370672C53} = {D77FBA6C-1AA6-45A4-93E2-97A370672C53}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pkg", "pkg", "{2B698E05-658B-4024-AB36-5E104D537CC1}"
ProjectSection(SolutionItems) = preProject
pkg\System.IO.FileSystem.AccessControl.builds = pkg\System.IO.FileSystem.AccessControl.builds
pkg\System.IO.FileSystem.AccessControl.pkgproj = pkg\System.IO.FileSystem.AccessControl.pkgproj
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{08653D19-36A7-4278-A38C-6A67FDD72BB0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{91794700-31C8-4DCC-8C1D-C323C558F972}"
ProjectSection(SolutionItems) = preProject
src\project.json = src\project.json
src\System.IO.FileSystem.AccessControl.builds = src\System.IO.FileSystem.AccessControl.builds
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{77EA6776-61A2-43CB-B08F-4833A18EC7A1}"
ProjectSection(SolutionItems) = preProject
tests\System.IO.FileSystem.AccessControl.Tests.builds = tests\System.IO.FileSystem.AccessControl.Tests.builds
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.IO.FileSystem.AccessControl", "src\System.IO.FileSystem.AccessControl.csproj", "{D77FBA6C-1AA6-45A4-93E2-97A370672C53}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.IO.FileSystem.AccessControl", "ref\System.IO.FileSystem.AccessControl.csproj", "{06E401AE-A25F-47D0-8337-43C315F08EDA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU = DebugNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU
ReleaseNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU = ReleaseNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU
DebugNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU = DebugNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU
ReleaseNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU = ReleaseNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU
DebugNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU = DebugNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU
ReleaseNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU = ReleaseNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.DebugNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Debug|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.DebugNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Debug|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.ReleaseNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Release|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.ReleaseNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Release|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.DebugNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Debug|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.DebugNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Debug|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.ReleaseNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Release|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.ReleaseNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Release|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.DebugNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Debug|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.DebugNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Debug|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.ReleaseNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Release|Any CPU
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}.ReleaseNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Release|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.DebugNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = net46-Windows_NT-Debug|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.DebugNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = net46-Windows_NT-Debug|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.ReleaseNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = net46-Windows_NT-Release|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.ReleaseNETCoreAppnet46-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = net46-Windows_NT-Release|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.DebugNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Debug|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.DebugNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Debug|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.ReleaseNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Windows_NT-Release|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.ReleaseNETCoreAppnetstandard1.3-Windows_NTnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Windows_NT-Release|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.DebugNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Unix-Debug|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.DebugNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Unix-Debug|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.ReleaseNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.ActiveCfg = netstandard1.3-Unix-Release|Any CPU
{D77FBA6C-1AA6-45A4-93E2-97A370672C53}.ReleaseNETCoreAppnetstandard1.3-Unixnetstandard1.3-Windows_NT|AnyCPU.Build.0 = netstandard1.3-Unix-Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{5915DD11-5D57-45A9-BFB0-56FEB7741E1F} = {5915DD11-5D57-45A9-BFB0-56FEB7741E1F}
{D77FBA6C-1AA6-45A4-93E2-97A370672C53} = {D77FBA6C-1AA6-45A4-93E2-97A370672C53}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />
<PropertyGroup>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<Project Include="System.IO.FileSystem.AccessControl.pkgproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<ProjectReference Include="..\ref\System.IO.FileSystem.AccessControl.csproj">
<SupportedFramework>net46;netcoreapp1.0</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.IO.FileSystem.AccessControl.builds" />
<NotSupportedOnTargetFramework Include="netcore50">
<PackageTargetRuntime>win</PackageTargetRuntime>
</NotSupportedOnTargetFramework>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netstandard;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,128 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.IO
{
[System.Security.SecurityCriticalAttribute]
public static partial class FileSystemAclExtensions
{
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo) { throw null; }
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections) { throw null; }
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo) { throw null; }
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections) { throw null; }
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream) { throw null; }
public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity) { }
public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity) { }
public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity) { }
}
}
namespace System.Security.AccessControl
{
[System.Security.SecurityCriticalAttribute]
public abstract partial class DirectoryObjectSecurity : System.Security.AccessControl.ObjectSecurity
{
protected DirectoryObjectSecurity() { }
protected DirectoryObjectSecurity(System.Security.AccessControl.CommonSecurityDescriptor securityDescriptor) { }
public virtual System.Security.AccessControl.AccessRule AccessRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type, System.Guid objectType, System.Guid inheritedObjectType) { throw null; }
protected void AddAccessRule(System.Security.AccessControl.ObjectAccessRule rule) { }
protected void AddAuditRule(System.Security.AccessControl.ObjectAuditRule rule) { }
public virtual System.Security.AccessControl.AuditRule AuditRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags, System.Guid objectType, System.Guid inheritedObjectType) { throw null; }
public System.Security.AccessControl.AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, System.Type targetType) { throw null; }
public System.Security.AccessControl.AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, System.Type targetType) { throw null; }
protected override bool ModifyAccess(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AccessRule rule, out bool modified) { throw null; }
protected override bool ModifyAudit(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AuditRule rule, out bool modified) { throw null; }
protected bool RemoveAccessRule(System.Security.AccessControl.ObjectAccessRule rule) { throw null; }
protected void RemoveAccessRuleAll(System.Security.AccessControl.ObjectAccessRule rule) { }
protected void RemoveAccessRuleSpecific(System.Security.AccessControl.ObjectAccessRule rule) { }
protected bool RemoveAuditRule(System.Security.AccessControl.ObjectAuditRule rule) { throw null; }
protected void RemoveAuditRuleAll(System.Security.AccessControl.ObjectAuditRule rule) { }
protected void RemoveAuditRuleSpecific(System.Security.AccessControl.ObjectAuditRule rule) { }
protected void ResetAccessRule(System.Security.AccessControl.ObjectAccessRule rule) { }
protected void SetAccessRule(System.Security.AccessControl.ObjectAccessRule rule) { }
protected void SetAuditRule(System.Security.AccessControl.ObjectAuditRule rule) { }
}
[System.Security.SecurityCriticalAttribute]
public sealed partial class DirectorySecurity : System.Security.AccessControl.FileSystemSecurity
{
public DirectorySecurity() { }
public DirectorySecurity(string name, System.Security.AccessControl.AccessControlSections includeSections) { }
}
[System.Security.SecurityCriticalAttribute]
public sealed partial class FileSecurity : System.Security.AccessControl.FileSystemSecurity
{
public FileSecurity() { }
public FileSecurity(string fileName, System.Security.AccessControl.AccessControlSections includeSections) { }
}
[System.Security.SecurityCriticalAttribute]
public sealed partial class FileSystemAccessRule : System.Security.AccessControl.AccessRule
{
public FileSystemAccessRule(System.Security.Principal.IdentityReference identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) { }
public FileSystemAccessRule(System.Security.Principal.IdentityReference identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) { }
public FileSystemAccessRule(string identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) { }
public FileSystemAccessRule(string identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) { }
public System.Security.AccessControl.FileSystemRights FileSystemRights { get { throw null; } }
}
[System.Security.SecurityCriticalAttribute]
public sealed partial class FileSystemAuditRule : System.Security.AccessControl.AuditRule
{
public FileSystemAuditRule(System.Security.Principal.IdentityReference identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) { }
public FileSystemAuditRule(System.Security.Principal.IdentityReference identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) { }
public FileSystemAuditRule(string identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) { }
public FileSystemAuditRule(string identity, System.Security.AccessControl.FileSystemRights fileSystemRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) { }
public System.Security.AccessControl.FileSystemRights FileSystemRights { get { throw null; } }
}
[System.FlagsAttribute]
[System.Security.SecurityCriticalAttribute]
public enum FileSystemRights
{
AppendData = 4,
ChangePermissions = 262144,
CreateDirectories = 4,
CreateFiles = 2,
Delete = 65536,
DeleteSubdirectoriesAndFiles = 64,
ExecuteFile = 32,
FullControl = 2032127,
ListDirectory = 1,
Modify = 197055,
Read = 131209,
ReadAndExecute = 131241,
ReadAttributes = 128,
ReadData = 1,
ReadExtendedAttributes = 8,
ReadPermissions = 131072,
Synchronize = 1048576,
TakeOwnership = 524288,
Traverse = 32,
Write = 278,
WriteAttributes = 256,
WriteData = 2,
WriteExtendedAttributes = 16,
}
[System.Security.SecurityCriticalAttribute]
public abstract partial class FileSystemSecurity : System.Security.AccessControl.NativeObjectSecurity
{
internal FileSystemSecurity() : base(default(bool), default(System.Security.AccessControl.ResourceType)) { }
public override System.Type AccessRightType { get { throw null; } }
public override System.Type AccessRuleType { get { throw null; } }
public override System.Type AuditRuleType { get { throw null; } }
public sealed override System.Security.AccessControl.AccessRule AccessRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) { throw null; }
public void AddAccessRule(System.Security.AccessControl.FileSystemAccessRule rule) { }
public void AddAuditRule(System.Security.AccessControl.FileSystemAuditRule rule) { }
public sealed override System.Security.AccessControl.AuditRule AuditRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) { throw null; }
public bool RemoveAccessRule(System.Security.AccessControl.FileSystemAccessRule rule) { throw null; }
public void RemoveAccessRuleAll(System.Security.AccessControl.FileSystemAccessRule rule) { }
public void RemoveAccessRuleSpecific(System.Security.AccessControl.FileSystemAccessRule rule) { }
public bool RemoveAuditRule(System.Security.AccessControl.FileSystemAuditRule rule) { throw null; }
public void RemoveAuditRuleAll(System.Security.AccessControl.FileSystemAuditRule rule) { }
public void RemoveAuditRuleSpecific(System.Security.AccessControl.FileSystemAuditRule rule) { }
public void ResetAccessRule(System.Security.AccessControl.FileSystemAccessRule rule) { }
public void SetAccessRule(System.Security.AccessControl.FileSystemAccessRule rule) { }
public void SetAuditRule(System.Security.AccessControl.FileSystemAuditRule rule) { }
}
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System.IO.FileSystem.AccessControl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Security.AccessControl\ref\System.Security.AccessControl.csproj" />
<ProjectReference Include="..\..\System.Security.Principal.Windows\ref\System.Security.Principal.Windows.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
net46-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AccessControl_InvalidAccessRuleType" xml:space="preserve">
<value>The access rule is not the correct type.</value>
</data>
<data name="AccessControl_InvalidAuditRuleType" xml:space="preserve">
<value>The audit rule is not the correct type.</value>
</data>
<data name="AccessControl_InvalidHandle" xml:space="preserve">
<value>The supplied handle is invalid. This can happen when trying to set an ACL on an anonymous kernel object.</value>
</data>
<data name="Arg_MustBeIdentityReferenceType" xml:space="preserve">
<value>Type must be an IdentityReference, such as NTAccount or SecurityIdentifier.</value>
</data>
<data name="Argument_InvalidEnumValue" xml:space="preserve">
<value>The value '{0}' is not valid for this usage of the type {1}.</value>
</data>
<data name="Argument_InvalidName" xml:space="preserve">
<value>Invalid name.</value>
</data>
<data name="ArgumentOutOfRange_Enum" xml:space="preserve">
<value>Enum value was out of legal range.</value>
</data>
<data name="ObjectDisposed_FileClosed" xml:space="preserve">
<value>Cannot access a closed file.</value>
</data>
</root>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<OSGroup Condition="'$(OSGroup)' == ''">Windows_NT</OSGroup>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<AssemblyName>System.IO.FileSystem.AccessControl</AssemblyName>
<ProjectGuid>{D77FBA6C-1AA6-45A4-93E2-97A370672C53}</ProjectGuid>
<AllowUnsafeBlocks Condition="'$(TargetGroup)'=='netcoreapp'">true</AllowUnsafeBlocks>
<GeneratePlatformNotSupportedAssembly Condition="'$(TargetsUnix)' == 'true'">true</GeneratePlatformNotSupportedAssembly>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)'=='net46'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net46-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net46-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Release|AnyCPU'" />
<ItemGroup Condition="'$(IsPartialFacadeAssembly)'!='true' AND '$(TargetsWindows)'=='true'">
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Errors.cs">
<Link>Common\Interop\Windows\Interop.Errors.cs</Link>
</Compile>
<Compile Include="System\Security\AccessControl\FileSecurity.cs" />
<Compile Include="System\Security\AccessControl\DirectoryObjectSecurity.cs" />
<Compile Include="System\IO\FileSystemAclExtensions.cs" />
<Compile Include="$(CommonPath)\System\NotImplemented.cs">
<Link>Common\Interop\Windows\mincore\NotImplemented.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)'=='net46'">
<TargetingPackReference Include="mscorlib" />
<Compile Include="System\IO\FileSystemAclExtensions.net46.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Diagnostics.Contracts" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.IO.FileSystem" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.Handles" />
<Reference Include="System.Security.AccessControl" />
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@ -0,0 +1,82 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.Win32.SafeHandles;
using System.Diagnostics.Contracts;
using System.Security.AccessControl;
using System;
namespace System.IO
{
public static class FileSystemAclExtensions
{
public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo)
{
return new DirectorySecurity(directoryInfo.FullName, AccessControlSections.Access | AccessControlSections.Owner | AccessControlSections.Group);
}
public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo, AccessControlSections includeSections)
{
return new DirectorySecurity(directoryInfo.FullName, includeSections);
}
public static void SetAccessControl(this DirectoryInfo directoryInfo, DirectorySecurity directorySecurity)
{
if (directorySecurity == null)
throw new ArgumentNullException(nameof(directorySecurity));
Contract.EndContractBlock();
String fullPath = Path.GetFullPath(directoryInfo.FullName);
directorySecurity.Persist(fullPath);
}
public static FileSecurity GetAccessControl(this FileInfo fileInfo)
{
return GetAccessControl(fileInfo, AccessControlSections.Access | AccessControlSections.Owner | AccessControlSections.Group);
}
public static FileSecurity GetAccessControl(this FileInfo fileInfo, AccessControlSections includeSections)
{
return new FileSecurity(fileInfo.FullName, includeSections);
}
public static void SetAccessControl(this FileInfo fileInfo, FileSecurity fileSecurity)
{
if (fileSecurity == null)
throw new ArgumentNullException(nameof(fileSecurity));
Contract.EndContractBlock();
String fullPath = Path.GetFullPath(fileInfo.FullName);
// Appropriate security check should be done for us by FileSecurity.
fileSecurity.Persist(fullPath);
}
public static FileSecurity GetAccessControl(this FileStream fileStream)
{
SafeFileHandle handle = fileStream.SafeFileHandle;
if (handle.IsClosed)
{
throw new ObjectDisposedException(null, SR.ObjectDisposed_FileClosed);
}
return new FileSecurity(handle, fileStream.Name, AccessControlSections.Access | AccessControlSections.Owner | AccessControlSections.Group);
}
[System.Security.SecuritySafeCritical] // auto-generated
public static void SetAccessControl(this FileStream fileStream, FileSecurity fileSecurity)
{
SafeFileHandle handle = fileStream.SafeFileHandle;
if (fileSecurity == null)
throw new ArgumentNullException(nameof(fileSecurity));
Contract.EndContractBlock();
if (handle.IsClosed)
{
throw new ObjectDisposedException(null, SR.ObjectDisposed_FileClosed);
}
fileSecurity.Persist(handle, fileStream.Name);
}
}
}

View File

@ -0,0 +1,51 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Security.AccessControl;
namespace System.IO
{
public static class FileSystemAclExtensions
{
public static DirectorySecurity GetAccessControl(DirectoryInfo directoryInfo)
{
return directoryInfo.GetAccessControl();
}
public static DirectorySecurity GetAccessControl(DirectoryInfo directoryInfo, AccessControlSections includeSections)
{
return directoryInfo.GetAccessControl(includeSections);
}
public static void SetAccessControl(DirectoryInfo directoryInfo, DirectorySecurity directorySecurity)
{
directoryInfo.SetAccessControl(directorySecurity);
}
public static FileSecurity GetAccessControl(this FileInfo fileInfo)
{
return fileInfo.GetAccessControl();
}
public static FileSecurity GetAccessControl(FileInfo fileInfo, AccessControlSections includeSections)
{
return fileInfo.GetAccessControl(includeSections);
}
public static void SetAccessControl(FileInfo fileInfo, FileSecurity fileSecurity)
{
fileInfo.SetAccessControl(fileSecurity);
}
public static FileSecurity GetAccessControl(FileStream fileStream)
{
return fileStream.GetAccessControl();
}
public static void SetAccessControl(FileStream fileStream, FileSecurity fileSecurity)
{
fileStream.SetAccessControl(fileSecurity);
}
}
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netstandard1.3-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,62 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Security.AccessControl;
using Xunit;
namespace System.IO
{
public class FileSystemAclExtensionsTests
{
[Fact]
public void GetAccessControl_DirectoryInfo_InvalidArguments()
{
Assert.Throws<NullReferenceException>(() => FileSystemAclExtensions.GetAccessControl((DirectoryInfo)null));
}
[Fact]
public void GetAccessControl_DirectoryInfo_AccessControlSections_InvalidArguments()
{
Assert.Throws<NullReferenceException>(() => FileSystemAclExtensions.GetAccessControl((DirectoryInfo)null, new AccessControlSections()));
}
[Fact]
public void GetAccessControl_FileInfo_InvalidArguments()
{
Assert.Throws<NullReferenceException>(() => FileSystemAclExtensions.GetAccessControl((FileInfo)null));
}
[Fact]
public void GetAccessControl_FileInfo_AccessControlSections_InvalidArguments()
{
Assert.Throws<NullReferenceException>(() => FileSystemAclExtensions.GetAccessControl((FileInfo)null, new AccessControlSections()));
}
[Fact]
public void GetAccessControl_Filestream_InvalidArguments()
{
Assert.Throws<NullReferenceException>(() => FileSystemAclExtensions.GetAccessControl((FileStream)null));
}
[Fact]
public void SetAccessControl_DirectoryInfo_DirectorySecurity_InvalidArguments()
{
DirectoryInfo directoryInfo = new DirectoryInfo("\\");
Assert.Throws<ArgumentNullException>("directorySecurity", () => FileSystemAclExtensions.SetAccessControl(directoryInfo, (DirectorySecurity)null));
}
[Fact]
public void SetAccessControl_FileInfo_FileSecurity_InvalidArguments()
{
FileInfo fileInfo = new FileInfo("\\");
Assert.Throws<ArgumentNullException>("fileSecurity", () => FileSystemAclExtensions.SetAccessControl(fileInfo, (FileSecurity)null));
}
[Fact]
public void SetAccessControl_FileStream_FileSecurity_InvalidArguments()
{
Assert.Throws<NullReferenceException>(() => FileSystemAclExtensions.SetAccessControl((FileStream)null, (FileSecurity)null));
}
}
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<Project Include="System.IO.FileSystem.AccessControl.Tests.csproj">
<OSGroup>Windows_NT</OSGroup>
<TestTFMs>netcoreapp;netcoreapp1.0;net46</TestTFMs>
</Project>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<ProjectGuid>{5915DD11-5D57-45A9-BFB0-56FEB7741E1F}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netstandard1.3-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netstandard1.3-Windows_NT-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="FileSystemAclExtensionsTests.cs" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>