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 EventWaitHandle creation extension method that takes an ACL #42213
Merged
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 30, 2019
carlossanlop
commented
Oct 30, 2019
src/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj
Show resolved
Hide resolved
carlossanlop
commented
Oct 30, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 30, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
stephentoub
reviewed
Oct 30, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Oct 30, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
stephentoub
reviewed
Oct 30, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Oct 30, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
danmoseley
reviewed
Oct 31, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
danmoseley
reviewed
Oct 31, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
danmoseley
reviewed
Oct 31, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
danmoseley
reviewed
Oct 31, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Oct 31, 2019
src/System.Threading.AccessControl/tests/ThreadingAclExtensionsTests.cs
Outdated
Show resolved
Hide resolved
stephentoub
reviewed
Nov 1, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
carlossanlop
commented
Nov 1, 2019
src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Nov 1, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Nov 1, 2019
src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Nov 1, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Nov 1, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Show resolved
Hide resolved
stephentoub
reviewed
Nov 1, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.net46.cs
Outdated
Show resolved
Hide resolved
stephentoub
reviewed
Nov 1, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
JeremyKuhne
reviewed
Nov 1, 2019
src/System.Threading.AccessControl/src/System/Threading/EventWaitHandleAcl.cs
Outdated
Show resolved
Hide resolved
BTW, unlike System.IO.FileSystem.AccessControl, System.Threading.AccessControl package is not in netcoreapp. Therefore if this was backported to servicing (which I was assuming would not happen anyway, since today's the last day), it would presumably need package authoring as well .cc @ericstj |
stephentoub
reviewed
Nov 7, 2019
src/System.Threading.AccessControl/tests/EventWaitHandleAclTests.cs
Outdated
Show resolved
Hide resolved
stephentoub
reviewed
Nov 7, 2019
src/System.Threading.AccessControl/tests/EventWaitHandleAclTests.cs
Outdated
Show resolved
Hide resolved
stephentoub
approved these changes
Nov 7, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than my test comments, LGTM.
JeremyKuhne
approved these changes
Nov 7, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing to add beyond Stephen's nits. Looks good.
…all Windows platforms, ensure same exceptions are thrown in both netcore and netfx.
…ly, merge methods, remove an unnecessary Debug.Assert
…xpects it, remove BOM from csproj
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.
Approved API Proposal: https://github.com/dotnet/corefx/issues/41662
Description
We don't currently have a way to create an EventWaitHandle with a given ACL in .NET Core. We can modify the ACL, but it would be more secure to have the proper ACL on the object from the start.
Customer impact
Before this change, customers had to create an EventWaitHandle, then set its ACLs. This presents a few problems:
This change addresses those problems by adding a new extension method that allows creating an EventWaitHandle and ensuring the provided ACLs are set during creation.
This change is expected to be backported to 3.1.