Commit Graph
8 Commits
Author SHA1 Message Date
James Bellinger c577dd4bb4 RegistrySecurity now working! 2012-07-07 18:45:26 -04:00
James Bellinger c6f901c2cf Mutexes and event wait handles now work, with tests included. Fixed the exception on failure for MutexSecurity. 2012-07-07 18:45:26 -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
Miguel de Icaza 3c39ac4586 Jumbo patch for NET_2_0, mscorlib is now clean
svn path=/trunk/mcs/; revision=145621
2009-11-06 22:23:59 +00:00
Atsushi Eno 001d97de25 2007-09-21 Atsushi Enomoto <[email protected]>
* AccessRule.cs AceEnumerator.cs AuditRule.cs AuthorizationRule.cs
	  AuthorizationRuleCollection.cs CommonAce.cs CommonAcl.cs
	  CommonObjectSecurity.cs CompoundAce.cs CryptoKeyAccessRule.cs
	  CryptoKeyAuditRule.cs CryptoKeySecurity.cs CustomAce.cs
	  DirectoryObjectSecurity.cs DirectorySecurity.cs
	  DiscretionaryAcl.cs EventWaitHandleAccessRule.cs
	  EventWaitHandleAuditRule.cs EventWaitHandleSecurity.cs
	  FileSecurity.cs FileSystemAccessRule.cs FileSystemAuditRule.cs
	  FileSystemSecurity.cs GenericAce.cs GenericAcl.cs KnownAce.cs
	  MutexAccessRule.cs MutexAuditRule.cs MutexSecurity.cs
	  NativeObjectSecurity.cs ObjectAccessRule.cs ObjectAce.cs
	  ObjectAuditRule.cs ObjectSecurity.cs QualifiedAce.cs
	  RawAcl.cs RegistryAccessRule.cs RegistryAuditRule.cs
	  RegistrySecurity.cs SystemAcl.cs :
	  they are not still functional, but being implemented.


svn path=/trunk/mcs/; revision=86129
2007-09-21 09:19:42 +00:00
Sebastien Pouliot f990319586 2006-10-31 Sebastien Pouliot <[email protected]>
* AccessRule.cs, AceEnumerator.cs, AuditRule.cs, 
	AuthorizationRuleCollection.cs, AuthorizationRule.cs, CommonAcl.cs,
	CommonObjectSecurity.cs, FileSystemSecurity.cs, GenericAce.cs,
	KnownAce.cs, NativeObjectSecurity.cs, ObjectSecurity.cs, 
	QualifiedAce.cs: Hide extraneous public empty .ctor.


svn path=/trunk/mcs/; revision=67199
2006-11-01 00:17:14 +00:00
Dick Porter e046a41d7d 2006-07-06 Dick Porter <[email protected]>
* corlib.dll.sources: Added
          System.Security.AccessControl/AccessControlModification.cs
          System.Security.AccessControl/AccessControlType.cs
          System.Security.AccessControl/AccessRule.cs
          System.Security.AccessControl/AceEnumerator.cs
          System.Security.AccessControl/AceFlags.cs
          System.Security.AccessControl/AceQualifier.cs
          System.Security.AccessControl/AceType.cs
          System.Security.AccessControl/AuditFlags.cs
          System.Security.AccessControl/AuditRule.cs
          System.Security.AccessControl/AuthorizationRule.cs
          System.Security.AccessControl/AuthorizationRuleCollection.cs
          System.Security.AccessControl/CommonAce.cs
          System.Security.AccessControl/CommonAcl.cs
          System.Security.AccessControl/CommonSecurityDescriptor.cs
          System.Security.AccessControl/CompoundAce.cs
          System.Security.AccessControl/CompoundAceType.cs
          System.Security.AccessControl/ControlFlags.cs
          System.Security.AccessControl/CryptoKeyAccessRule.cs
          System.Security.AccessControl/CryptoKeyAuditRule.cs
          System.Security.AccessControl/CryptoKeyRights.cs
          System.Security.AccessControl/CustomAce.cs
          System.Security.AccessControl/DirectoryObjectSecurity.cs
          System.Security.AccessControl/DiscretionaryAcl.cs
          System.Security.AccessControl/EventWaitHandleAccessRule.cs
          System.Security.AccessControl/EventWaitHandleAuditRule.cs
          System.Security.AccessControl/FileSecurity.cs
          System.Security.AccessControl/FileSystemAccessRule.cs
          System.Security.AccessControl/FileSystemAuditRule.cs
          System.Security.AccessControl/FileSystemRights.cs
          System.Security.AccessControl/FileSystemSecurity.cs
          System.Security.AccessControl/GenericAce.cs
          System.Security.AccessControl/GenericAcl.cs
          System.Security.AccessControl/GenericSecurityDescriptor.cs
          System.Security.AccessControl/InheritanceFlags.cs
          System.Security.AccessControl/KnownAce.cs
          System.Security.AccessControl/MutexAccessRule.cs
          System.Security.AccessControl/MutexAuditRule.cs
          System.Security.AccessControl/ObjectAccessRule.cs
          System.Security.AccessControl/ObjectAce.cs
          System.Security.AccessControl/ObjectAceFlags.cs
          System.Security.AccessControl/ObjectAuditRule.cs
          System.Security.AccessControl/PrivilegeNotHeldException.cs
          System.Security.AccessControl/PropagationFlags.cs
          System.Security.AccessControl/QualifiedAce.cs
          System.Security.AccessControl/RawAcl.cs
          System.Security.AccessControl/RawSecurityDescriptor.cs
          System.Security.AccessControl/RegistryAccessRule.cs
          System.Security.AccessControl/RegistryAuditRule.cs
          System.Security.AccessControl/RegistryRights.cs
          System.Security.AccessControl/RegistrySecurity.cs
          System.Security.AccessControl/ResourceType.cs
          System.Security.AccessControl/SecurityInfos.cs
          System.Security.AccessControl/SystemAcl.cs

2006-07-06  Dick Porter  <[email protected]>

        * System.dll.sources: Added
        System.Security.AccessControl/SemaphoreAccessRule.cs
        System.Security.AccessControl/SemaphoreAuditRule.cs


2006-07-06  Dick Porter  <[email protected]>

        * Completely stubbed the System.Security.AccessControl namespace
        for the 2.0 profile.




svn path=/trunk/mcs/; revision=62321
2006-07-06 15:35:13 +00:00
Dick Porter f6ce484bf8 2005-12-17 Dick Porter <[email protected]>
* ThreadStartException.cs: 
        * EventWaitHandle.cs: 
        * EventResetMode.cs: 
        * AbandonedMutexException.cs: New for 2.0 profile

        * ThreadState.cs: 
        * Interlocked.cs: 
        * RegisteredWaitHandle.cs: 
        * Monitor.cs: 
        * ThreadPriority.cs: 
        * Mutex.cs: 
        * ManualResetEvent.cs: 
        * AutoResetEvent.cs: Updated for 2.0 profile

2005-12-17  Dick Porter  <[email protected]>

        * EventWaitHandleRights.cs: New for 2.0 profile

        * MutexSecurity.cs: 
        * EventWaitHandleSecurity.cs: 
        * CommonObjectSecurity.cs: 
        * NativeObjectSecurity.cs: 
        * ObjectSecurity.cs: New partial stub for 2.0 profile

2005-12-17  Dick Porter  <[email protected]>

        * corlib.dll.sources: Added in System.Security.AccessControl:
        CommonObjectSecurity.cs, EventWaitHandleRights.cs,
        EventWaitHandleSecurity.cs, ObjectSecurity.cs, MutexSecurity.cs,
        NativeObjectSecurity.cs.  Added in System.Threading:
        AbandonedMutexException.cs, EventResetMode.cs, EventWaitHandle.cs,
        ThreadStartException.cs



svn path=/trunk/mcs/; revision=54567
2005-12-17 18:17:58 +00:00