Add NamedPipeServerStream method that takes an ACL (#317)
authorCarlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com>
Mon, 2 Dec 2019 23:54:46 +0000 (15:54 -0800)
committerGitHub <noreply@github.com>
Mon, 2 Dec 2019 23:54:46 +0000 (15:54 -0800)
commit034c5a695a312417741811450e25f3bd2f9bc6b6
treef198882595bd9701beee015544260bfe837acc78
parent167e9f4d70e5754fce2a884461122b88f5cf4f7a
Add NamedPipeServerStream method that takes an ACL (#317)

Add NamedPipeServerStream method that takes an ACL

Approved API proposal: dotnet/corefx#41657

We don't currently have a way to create a pipe 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 pipe from the start.

This PR adds a new static class and method that can create an NamedPipeServerStream taking a PipeSecurity object, reusing code that can already perform this task.
13 files changed:
src/libraries/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.cs
src/libraries/System.IO.Pipes.AccessControl/tests/AnonymousPipeTests/AnonymousPipeServerStreamAclTests.cs
src/libraries/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeServerStreamAclTests.cs [new file with mode: 0644]
src/libraries/System.IO.Pipes.AccessControl/tests/PipeServerStreamAclTestBase.cs
src/libraries/System.IO.Pipes.AccessControl/tests/PipeTest.AclExtensions.cs
src/libraries/System.IO.Pipes.AccessControl/tests/System.IO.Pipes.AccessControl.Tests.csproj
src/libraries/System.IO.Pipes/src/MatchingRefApiCompatBaseline.txt
src/libraries/System.IO.Pipes/src/Resources/Strings.resx
src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.cs
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStreamAcl.cs [new file with mode: 0644]
src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs