This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add directory creation method that takes an ACL #41834
Merged
carlossanlop
merged 29 commits into
dotnet:master
from
carlossanlop:FileSystemAclExtensions_Create
Oct 23, 2019
Merged
Add directory creation method that takes an ACL #41834
carlossanlop
merged 29 commits into
dotnet:master
from
carlossanlop:FileSystemAclExtensions_Create
Oct 23, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
carlossanlop
commented
Oct 16, 2019
src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 16, 2019
src/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 16, 2019
src/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 16, 2019
src/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 16, 2019
src/System.IO.FileSystem.AccessControl/src/System/Security/AccessControl/FileSecurity.cs
Show resolved
Hide resolved
carlossanlop
commented
Oct 16, 2019
carlossanlop
commented
Oct 16, 2019
carlossanlop
commented
Oct 16, 2019
carlossanlop
commented
Oct 16, 2019
src/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs
Show resolved
Hide resolved
danmoseley
reviewed
Oct 16, 2019
src/System.IO.FileSystem.AccessControl/tests/FileSystemAclExtensionsTests.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Oct 16, 2019
JeremyKuhne
reviewed
Oct 16, 2019
carlossanlop
commented
Oct 17, 2019
src/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 17, 2019
src/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Oct 17, 2019
carlossanlop
commented
Oct 17, 2019
carlossanlop
commented
Oct 17, 2019
src/System.IO.FileSystem/src/System/IO/FileSystem.AccessControl.Windows.cs
Show resolved
Hide resolved
carlossanlop
commented
Oct 17, 2019
carlossanlop
commented
Oct 17, 2019
src/System.IO.FileSystem.AccessControl/src/Resources/Strings.resx
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 17, 2019
src/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj
Outdated
Show resolved
Hide resolved
Author
|
Due to the size of this change, his PR will only include the changes for the Directory Create method. I'll submit the File Create method in a new PR. |
carlossanlop
commented
Oct 17, 2019
JeremyKuhne
reviewed
Oct 17, 2019
src/System.IO.FileSystem/src/System/IO/FileSystem.AccessControl.Windows.cs
Outdated
Show resolved
Hide resolved
…f that removed method.
…triple slash, add unit test.
…System.Runtime needs to be included to recognize NotNullIfNotNullAttribute, consumed in Path.Internal.cs
…netfx build problems
This was referenced Oct 23, 2019
carlossanlop
added a commit
that referenced
this pull request
Oct 29, 2019
Approved API Proposal: #41614 Related change for directory creation method that takes an ACL: #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.
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
* 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 dotnet/corefx@5ed2e98
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
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 dotnet/corefx@508cbc4
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/dotnet/corefx/issues/41614
@JeremyKuhne