X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Core%2FSystem.IO.Pipes%2FPipeStream.cs;h=fd4a57a693063f4b21c28f755bd953d42089206b;hb=c0a8ef12af1f473bfc837325581fe738f1b3178c;hp=129b910be6d3dd6cb83559b9df4ce70bde7f9f95;hpb=f78e6f8fee273c6c80c8c36e7e1b2bbd8392b8cb;p=mono.git diff --git a/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs b/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs index 129b910be6d..fd4a57a6930 100644 --- a/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs +++ b/mcs/class/System.Core/System.IO.Pipes/PipeStream.cs @@ -132,7 +132,9 @@ namespace System.IO.Pipes if (!IsConnected) throw new InvalidOperationException ("Pipe is not connected"); if (stream == null) - stream = new FileStream (handle.DangerousGetHandle (), CanRead ? (CanWrite ? FileAccess.ReadWrite : FileAccess.Read) : FileAccess.Write, true, buffer_size, IsAsync); + stream = new FileStream (handle.DangerousGetHandle (), + CanRead ? (CanWrite ? FileAccess.ReadWrite : FileAccess.Read) + : FileAccess.Write, true, buffer_size, IsAsync); return stream; } set { stream = value; } @@ -193,7 +195,7 @@ namespace System.IO.Pipes protected internal void CheckWriteOperations () { if (!IsConnected) - throw new InvalidOperationException ("Pipe us not connected"); + throw new InvalidOperationException ("Pipe is not connected"); if (!CanWrite) throw new NotSupportedException ("The pipe stream does not support write operations"); } @@ -232,16 +234,20 @@ namespace System.IO.Pipes throw new NotSupportedException (); } - [MonoNotSupported ("ACL is not supported in Mono")] public PipeSecurity GetAccessControl () { - throw ThrowACLException (); + return new PipeSecurity (SafePipeHandle, + AccessControlSections.Owner | + AccessControlSections.Group | + AccessControlSections.Access); } - [MonoNotSupported ("ACL is not supported in Mono")] public void SetAccessControl (PipeSecurity pipeSecurity) { - throw ThrowACLException (); + if (pipeSecurity == null) + throw new ArgumentNullException ("pipeSecurity"); + + pipeSecurity.Persist (SafePipeHandle); } // pipe I/O