Approved API Proposal: dotnet/corefx#41614
Related change for directory creation method that takes an ACL: dotnet/corefx#41834 -merged and ported to 3.1 Prev2
Description
We have extension methods in System.IO.FileSystem.AclExtensions that let the user get and set ACLs for existing files, but we do not have methods that create files with predefined ACLs.
.NET ACL (Access Control List) support is Windows specific. This change will reside inside the System.IO.FileSystem.AccessControl assembly.
Customer impact
Before this change, customers had to create a file or filestream, then set its ACLs. This presents a few problems:
Potential security hole as files can be accessed between creation and modification.
Porting difficulties as there isn't a 1-1 API replacement
Stability issues with background processes (file filters) can prevent modifying ACLs right after creation (typically surfaces as a security exception).
This change addresses those problems by adding a new extension method that allows creating a file and ensuring the provided ACLs are set during creation.
This change is expected to be backported to 3.1.
Commit migrated from https://github.com/dotnet/corefx/commit/508cbc4f1021e260b52981b8510cc5a5881441d3
* First commit
* Fix OperationCanceledException dependency error, revert nullable indication
* Only Directory files
* Unit tests verifications
* Split FileSystem.Windows into two additional files instead of one. Fix pinning.
* Remove dead comment, add actual UT verifications
* User WellKnownSidType
* Make method unsafe, nit comments addressed.
* Remove irrelevant comment
* Add additional exceptions to triple slash
* Add unit tests for additional exceptions
* Remove FileSystem.cs, it has one obsolete method. Replace all calls of that removed method.
* Second pass on required strings.resx resources
* Remove unused dependency cs files
* Move shared files to Common
* Add the missing braces
* Add nulcheck for this argument, add exception, document exception in triple slash, add unit test.
* Fix netstandard CI build failure
* Fix Microsoft.IO.Redist build issue with NetStandard
* Remove unnecessary assert in ut
* Fix build problem in Windows Packaging All Configurations x64_Debug, System.Runtime needs to be included to recognize NotNullIfNotNullAttribute, consumed in Path.Internal.cs
* Additional file splitting and dependency addition to fix netstandard/netfx build problems
* Fix netstandard and netcoreapp build issues
* Remove unused file
* nit cleaning
* Minimal unit tests
* Remove unused unit test code and spacing fix
* Add full framework condition to unit test
* Additional fix for full framework
Commit migrated from https://github.com/dotnet/corefx/commit/5ed2e98718700ba37ed95c34ee04960b5aba1aa0
Mechanical/automated change. The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.
Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
* Enable xUnit2000 analyzer
This commit enables xUnit2000 (Constants and literals should be the expected argument) and apply fixes for the existing violating codes.
* a Massive commit fixing xUnit2000
* fixing some 2003 errors
* Fix mistakes
* Fix missed errors for unix
Commit migrated from https://github.com/dotnet/corefx/commit/93d7aa1c1737b6da29d04b78557215e18eb786d4
* Replace "Assert.Equal(true, " with "Assert.True("
* Replace "Assert.Equal(false, " with "Assert.False("
And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.
* Replace "Assert.StrictEqual(true, " with "Assert.True("
* Revert a few changes where true/false was being compared to object
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
* Expose SecurityDescriptor as protected
Classes derived from ObjectSecurity depended on seeing the _securityDescriptor field, which is marked internal. Internal visibility no longer works as types have split into different assemblies and is causing failures, such as dotnet/corefx#35993.
This change also ran the UpdateVSConfigurations target on the changed libraries.
* Address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/7570445805fe57966ff6494fcd582de8b79088a0
* Auto-generate the reference assemblies
* Add back type forwards.
* Revert "Add back type forwards."
This reverts commit dotnet/corefx@3acf74aabb.
* Add back TypeForwardedTo in .Forward.cs files
* Add new type forward files to the csproj files
* Add back if-defs and move TestUtilities comment from ref to source
* Remove duplicate definitions, delete unnecessary manual files,
* Fix build breaks
* Add back missing AsyncMethodBuilderAttr to S.Runtime ref
* Fix typo between XmlDocument and XPath.XDocument
* Add type forward fild missed from previous commit
* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1
* Remove "this type was moved to comments" from the type forwards.
* Add back the Xml and Debugger* attributes to Xml.ReaderWriter
* Add back struct layout attributes
* Add back attributes missing (highlighted from api compat)
* Add missing toolbox item attribute in s.data.common.
* Add missing struct layout attributes and remove unnecessary additions
* Add back InterfaceTypeAttribute
Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
* Change netfx to target .NET 4.7.1
* Fix CoreFx.Private.TestUtilities to not reference System.Runtime.InteropServices.RuntimeInformation which is now inbox in netfx
* Fix StackTrace.Tests to be built against netstandard and run against netfx inbox
* Fix ValueTuple configurations to support net461 and add netfx placeholder configuration since in net471 it is now inbox
* Fix projects' package configurations that had netfx (net461) to still support net461 and netfx as a buildconfigurations
* Disable failing tests when running on .NET 4.7.1
* Make netfx target net472 and merge with master
* Update ActiveIssue comments to issue number only
* Workaround packages tests due to not installed targeting pack
* Match NSSupportPackage version to CLI's
* Remove netstandard support lib bin placing to runtime and testhost for netfx, fix reference paths to match new package
* Run UpdateVSConfigurations after merging conflicts with the newly updated SDK projects
* Add net461 package configuration to System.CodeDom
* Add net461 package configuration to System.Configuration.ConfigurationManager
* Add net461 package configuration to System.Security.Cryptography.Xml
* Add net461 package configuration to System.Security.Permissions
* Add net461 package configuration to System.ServiceModel.Syndication
Commit migrated from https://github.com/dotnet/corefx/commit/faad2e63b35bed10fe18195987a413308b97eded
There are a few packages which have only a small number
of packages that are part of NETStandard.Library which we
should avoid replacing with NETStandard.Library because it adds
a lot of extra package dependencies which aren't necessary.
Commit migrated from https://github.com/dotnet/corefx/commit/09d84b70fc63b57cccdc2135055f7aa0d1876855
* Updating the package index for UAP and updating buildtools
* Having System.Reflection.DispatchProxy crosscompile for uap RS3
* Updating buildtools and fixing PR feedback
* Re-add support for uap to the assemblies that already had a netcoreapp2.0 config for Windows
Commit migrated from https://github.com/dotnet/corefx/commit/7be44d2de8661cd925955e540d940b4eb47e5753
* Add System.Drawing.Common to netcoreapp vertical
* Make System.Data.Odbc be able to build for netcoreapp vertical
* Add netcoreapp to System.Diagnostics.PerformanceCounter
* Add netcoreapp to System.Diagnostics.EventLog
* Run UpdateVSConfigurations
* Change Contains('netcoreapp') to StartsWith('netcoreapp')
* Include netcoreapp.depproj only when BuildAllConfigurations == true
* Change tests to netcoreapp from netcoreapp2.0 for vertical
Commit migrated from https://github.com/dotnet/corefx/commit/edacccb1cd6ecf7d36cd2379df8dd609ae0eb9a4
* Stabilize configurations for Microsoft.Win32.Registry
* Stabilize configurations for System.IO.FileSystem.AccessControl
* Stabilize configurations for System.IO.Packaging
* Stabilize configurations for System.Security.AccessControl
* Stabilize configurations for System.Principal.Windows
* Stabilize configurations for System.ServiceProcess.ServiceController
* Stabilize configurations for System.Text.Encoding.CodePages
* Some extra cleanup
* Fix CI failures
Commit migrated from https://github.com/dotnet/corefx/commit/39cdb933600c5dcdec1157b8d5755ec37950e2e0
* Fix System.DirectoryServices configurations and generate PNS assembly correctly
* Fix CI adding UapVNext as a target framework for the pkg
* Fix configurations to be PNSE when targeting netstandard or any non-windows configuration
* Disable test that is using DirectoryServices and is getting PNSE
Commit migrated from https://github.com/dotnet/corefx/commit/3be15ca3d519fafc149c08b20727f88cb0f76e6a
These are for packages that are outside of the shared framework. We shouldn't make them
cross-compile for netcoreapp2.1 just because master has moved to that. Instead we'll make
them continue to target netcoreapp2.0.
Two cases we want to cross-compile are OpenSsl and Cng since these have already started
taking advantage of API added in NCA2.1 (span). For this we'll cross-compile and redist the
old netcoreapp2.0 implementation.
Two other special cases are System.Memory and System.Runtime.CompilerServices.Unsafe.
In these cases we wanted to keep them targeting netcoreapp (netcoreapp2.1) and
make their portable implementations apply for netcoreapp2.0.
Commit migrated from https://github.com/dotnet/corefx/commit/4a94c7b730928eda2e540b0d95bf8b9e89376907