Commit Graph
8 Commits
Author SHA1 Message Date
Marek Safar f8384a1e3b Duplicate less mscorlib code in System.Core 2013-01-03 18:40:02 +01:00
James Bellinger 490a86b6ec Implemented PipeSecurity. GetAccessControl, SetAccessControl, and ACL-containing constructor overrides now work on pipes.
On another note, after writing a test I discovered Asynchronous pipes appear to be completely broken on Win32.
The class does not correctly handle overlapped I/O. This patch doesn't fix that.

One other fix in this patch, the DllImports for Win32 pipes did not have SetLastError set.
So, they were unable to return a meaningful error in the event of failure. This is now fixed, and
UnauthorizedAccessException correctly throws for pipe connects denied by ACL (necessary for PipeSecurity test).
2012-07-08 15:13:51 -04:00
James Bellinger 9322e0d16b ACLs now work on Windows. Tests all the way up to DirectorySecurityTest and FileSecurityTest.
NativeObjectSecurity is implemented.
I've done it in such a way that, for OSes that do not have a unified API for all ACLs,
overrides can be done in subclasses such as FileSystemSecurity without trouble.

ObjectSecurity, CommonObjectSecurity, and DirectoryObjectSecurity all implemented.
MutexSecurity, PipeSecurity, etc. all just add type specialization and nothing else. Implemented all of these as well.

Access and Audit rules now correctly use NTAccount in their string overloads (see unit tests).
The constructors all provide correct AccessMasks now. In other words, these classes are all now un-broken/no longer stubs.

More unit tests for CommonSecurityDescriptor and fixes to pass them.
A few had checks that were redundant (implemented by (Authorization|Audit|Access)Rule) as well. These have been removed.
The Allow Everyone Full Access default for null DiscretionaryAcls in CommonSecurityDescriptor is, I think,
properly implemented. This required some changes to GenericSecurityDescriptor as well, but now Mono matches
MS.NET on GetSddl/GetBinaryForm for null DiscretionaryAcl including roundtrip.

What's still missing:
(1) CommonAcl's RemoveAccess/RemoveAudit. RemoveAll and RemoveSpecific work so it's not a big issue.
(2) CommonAcl merging will not yet try to merge a CommonAce together with an ObjectAce.
(3) The various *Security constructors. Get/SetAccessControl work on files and directories.
However, you still have to create and then set. I am not too familiar with Mono runtime internal
calls, but to someone who is: If the SECURITY_ATTRIBUTES parameter to Create*'s lpSecurityDescriptor
pointed to the output of GenericSecurityDescriptor's GetBinaryForm, that would be a complete
implementation.
2012-07-07 18:45:06 -04:00
Marek Safar 81cf39742a Update few constant values 2011-10-07 10:11:30 +01:00
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Marek Safar e56e2701a5 Make ready for bootstrap.
svn path=/trunk/mcs/; revision=147775
2009-12-07 14:17:04 +00:00
Atsushi Eno 63e3ea6d29 2009-08-27 Atsushi Enomoto <[email protected]>
* PipeStream.cs : add set_Stream.
        * PipeUnix.cs : some impl. code (not really functional).

        * Makefile : add -r:Mono.Posix on required profiles.


svn path=/trunk/mcs/; revision=140793
2009-08-27 11:18:51 +00:00
Atsushi Eno 6a93ece2a5 Adding System.IO.Pipes implementation.
svn path=/trunk/mcs/; revision=140228
2009-08-19 10:19:40 +00:00