Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirror changes from dotnet/coreclr,corefx #7873

Merged
merged 7 commits into from Nov 8, 2019

Conversation

@Dotnet-GitSync-Bot
Copy link
Contributor

Dotnet-GitSync-Bot commented Nov 8, 2019

This PR contains mirrored changes from dotnet/coreclr,corefx

Please REBASE this PR when merging

cc @TamarChristinaArm @tannergooding @CoffeeFlux @carlossanlop

TamarChristinaArm and others added 7 commits Nov 7, 2019
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
… fractional digits being zero. (#27688)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Approved API Proposal: #41662

Description
We don't currently have a way to create a Semaphore 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 a Semaphore, then set its ACLs. This presents a few problems:
- Potential security hole as semaphores can be accessed between creation and modification.
- Porting difficulties as there isn't a 1-1 API replacement
This change addresses those problems by adding a new extension method that allows creating a Semaphore and ensuring the provided ACLs are set during creation.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Add EventWaitHandle creation extension method that takes an ACL

* Call OpenExisting, add basic unit tests, move MAX_PATH in csproj for all Windows platforms, ensure same exceptions are thrown in both netcore and netfx.

* Address suggestions: using for the created handle, simplify try finally, merge methods, remove an unnecessary Debug.Assert

* simplify using, reorganize PInvokes a bit, let VS format resx as it expects it, remove BOM from csproj

* Add more unit tests

* Save basic access rights in a constant, generate name randomly

* Use FullControl (EVENT_ALL_ACCESS); update unit tests to use EventWaitHandleRights

* Apply suggestion of creating an EWH, then replacing its SWH.

* Remove using causing chaos, add more unit tests, remove null string unit test.

* spacing

* Address comments

* Remove unnecessary checks/exceptions, update unit tests

* Fix netfx x86 ut failure - different exception for mode validation.

* Small documentation fix

* Remove documentation for exception thrown with null security

* more documentation fixes

* New file for unit tests

* Dispose and remove windows only attributes in tests

* suggestion to not use var

* Remove duplicate resx after merge

* Readd cs files lost during merge

* Remove resx modification since it was untouched for this PR

* Address test comments

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
@jkotas jkotas merged commit 2465039 into dotnet:master Nov 8, 2019
12 checks passed
12 checks passed
WIP Ready for review
Details
corert-ci Build #20191107.5 succeeded
Details
corert-ci (Build Linux x64 debug and CoreCLR tests) Build Linux x64 debug and CoreCLR tests succeeded
Details
corert-ci (Build Linux x64 debug and CoreFX tests) Build Linux x64 debug and CoreFX tests succeeded
Details
corert-ci (Build Linux x64 release) Build Linux x64 release succeeded
Details
corert-ci (Build OSX x64 debug and CoreCLR tests) Build OSX x64 debug and CoreCLR tests succeeded
Details
corert-ci (Build OSX x64 debug and CoreFX tests) Build OSX x64 debug and CoreFX tests succeeded
Details
corert-ci (Build OSX x64 release) Build OSX x64 release succeeded
Details
corert-ci (Build Windows_NT x64 debug and CoreCLR tests) Build Windows_NT x64 debug and CoreCLR tests succeeded
Details
corert-ci (Build Windows_NT x64 debug and CoreFX tests) Build Windows_NT x64 debug and CoreFX tests succeeded
Details
corert-ci (Build Windows_NT x64 release) Build Windows_NT x64 release succeeded
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.