Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/class/System/ChangeLog6
-rw-r--r--mcs/class/System/System.Security.AccessControl/ChangeLog5
-rw-r--r--mcs/class/System/System.Security.AccessControl/SemaphoreAccessRule.cs63
-rw-r--r--mcs/class/System/System.Security.AccessControl/SemaphoreAuditRule.cs56
-rw-r--r--mcs/class/System/System.Security.AccessControl/SemaphoreSecurity.cs101
-rw-r--r--mcs/class/System/System.dll.sources2
-rw-r--r--mcs/class/corlib/ChangeLog57
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AccessControlActions.cs8
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AccessControlModification.cs42
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AccessControlType.cs38
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AccessRule.cs80
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AceEnumerator.cs63
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AceFlags.cs47
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AceQualifier.cs40
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AceType.cs54
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AuditFlags.cs40
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AuditRule.cs76
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AuthorizationRule.cs107
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs50
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ChangeLog5
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CommonAce.cs62
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CommonAcl.cs109
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CommonObjectSecurity.cs87
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs180
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CompoundAce.cs72
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CompoundAceType.cs37
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ControlFlags.cs54
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CryptoKeyAccessRule.cs61
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CryptoKeyAuditRule.cs61
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CryptoKeyRights.cs54
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs105
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/CustomAce.cs82
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/DirectoryObjectSecurity.cs130
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/DirectorySecurity.cs15
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs138
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAccessRule.cs61
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAuditRule.cs75
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/EventWaitHandleRights.cs2
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/EventWaitHandleSecurity.cs94
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/FileSecurity.cs46
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/FileSystemAccessRule.cs79
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/FileSystemAuditRule.cs79
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/FileSystemRights.cs61
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/FileSystemSecurity.cs123
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/GenericAce.cs132
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/GenericAcl.cs103
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs96
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/InheritanceFlags.cs40
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/KnownAce.cs58
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/MutexAccessRule.cs61
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/MutexAuditRule.cs54
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/MutexSecurity.cs100
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/NativeObjectSecurity.cs82
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ObjectAccessRule.cs69
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ObjectAce.cs95
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ObjectAceFlags.cs40
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ObjectAuditRule.cs69
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs240
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/PrivilegeNotHeldException.cs71
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/PropagationFlags.cs40
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/QualifiedAce.cs67
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/RawAcl.cs91
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/RawSecurityDescriptor.cs116
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/RegistryAccessRule.cs79
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/RegistryAuditRule.cs65
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/RegistryRights.cs52
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/RegistrySecurity.cs127
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ResourceType.cs49
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/SecurityInfos.cs41
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs133
-rw-r--r--mcs/class/corlib/corlib.dll.sources53
71 files changed, 4978 insertions, 52 deletions
diff --git a/mcs/class/System/ChangeLog b/mcs/class/System/ChangeLog
index 8b083be5ff7..a430cdd30e5 100644
--- a/mcs/class/System/ChangeLog
+++ b/mcs/class/System/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-06 Dick Porter <dick@ximian.com>
+
+ * System.dll.sources: Added
+ System.Security.AccessControl/SemaphoreAccessRule.cs
+ System.Security.AccessControl/SemaphoreAuditRule.cs
+
2006-05-10 Atsushi Enomoto <atsushi@ximian.com>
* System_test.dll.sources : added ConnectionManagementSectionTest.cs
diff --git a/mcs/class/System/System.Security.AccessControl/ChangeLog b/mcs/class/System/System.Security.AccessControl/ChangeLog
index d17e2d555c2..5b3d4fb238f 100644
--- a/mcs/class/System/System.Security.AccessControl/ChangeLog
+++ b/mcs/class/System/System.Security.AccessControl/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-06 Dick Porter <dick@ximian.com>
+
+ * Completely stubbed the System.Security.AccessControl namespace
+ for the 2.0 profile.
+
2005-12-23 Dick Porter <dick@ximian.com>
* SemaphoreRights.cs: Make the [Flags] enum more obvious
diff --git a/mcs/class/System/System.Security.AccessControl/SemaphoreAccessRule.cs b/mcs/class/System/System.Security.AccessControl/SemaphoreAccessRule.cs
new file mode 100644
index 00000000000..a885b7db026
--- /dev/null
+++ b/mcs/class/System/System.Security.AccessControl/SemaphoreAccessRule.cs
@@ -0,0 +1,63 @@
+//
+// System.Security.AccessControl.SemaphoreAccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Runtime.InteropServices;
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ [ComVisible (false)]
+ public sealed class SemaphoreAccessRule : AccessRule
+ {
+ SemaphoreRights semaphoreRights;
+
+ public SemaphoreAccessRule (IdentityReference identity,
+ SemaphoreRights semaphoreRights,
+ AccessControlType type)
+ {
+ this.semaphoreRights = semaphoreRights;
+ }
+
+ public SemaphoreAccessRule (string identity,
+ SemaphoreRights semaphoreRights,
+ AccessControlType type)
+ {
+ this.semaphoreRights = semaphoreRights;
+ }
+
+ public SemaphoreRights SemaphoreRights
+ {
+ get {
+ return(semaphoreRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System/System.Security.AccessControl/SemaphoreAuditRule.cs b/mcs/class/System/System.Security.AccessControl/SemaphoreAuditRule.cs
new file mode 100644
index 00000000000..9976a877c66
--- /dev/null
+++ b/mcs/class/System/System.Security.AccessControl/SemaphoreAuditRule.cs
@@ -0,0 +1,56 @@
+//
+// System.Security.AccessControl.SemaphoreAuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Runtime.InteropServices;
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ [ComVisible (false)]
+ public sealed class SemaphoreAuditRule : AuditRule
+ {
+ SemaphoreRights semaphoreRights;
+
+ public SemaphoreAuditRule (IdentityReference identity,
+ SemaphoreRights semaphoreRights,
+ AuditFlags flags)
+ {
+ this.semaphoreRights = semaphoreRights;
+ }
+
+ public SemaphoreRights SemaphoreRights
+ {
+ get {
+ return(semaphoreRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System/System.Security.AccessControl/SemaphoreSecurity.cs b/mcs/class/System/System.Security.AccessControl/SemaphoreSecurity.cs
index 7360507a609..764d1a9cbdf 100644
--- a/mcs/class/System/System.Security.AccessControl/SemaphoreSecurity.cs
+++ b/mcs/class/System/System.Security.AccessControl/SemaphoreSecurity.cs
@@ -1,10 +1,11 @@
//
// System.Security.AccessControl.SemaphoreSecurity class
//
-// Author:
+// Authors:
// Sebastien Pouliot <sebastien@ximian.com>
+// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,16 +30,104 @@
#if NET_2_0
using System.Runtime.InteropServices;
+using System.Security.Principal;
namespace System.Security.AccessControl {
-
- [MonoTODO ("incomplete - required for compilation of Semaphore")]
[ComVisible (false)]
- public sealed class SemaphoreSecurity {
-
+ public sealed class SemaphoreSecurity : NativeObjectSecurity {
public SemaphoreSecurity ()
{
}
+
+ public SemaphoreSecurity (string name, AccessControlSections includesections)
+ {
+ }
+
+ public override Type AccessRightType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AccessRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AuditRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccessRule (SemaphoreAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAuditRule (SemaphoreAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccessRule (SemaphoreAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleAll (SemaphoreAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleSpecific (SemaphoreAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAuditRule (SemaphoreAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleAll (SemaphoreAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleSpecific (SemaphoreAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetAccessRule (SemaphoreAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRule (SemaphoreAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRule (SemaphoreAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/System/System.dll.sources b/mcs/class/System/System.dll.sources
index 3fa1d6cabf2..5e266b960fc 100644
--- a/mcs/class/System/System.dll.sources
+++ b/mcs/class/System/System.dll.sources
@@ -757,6 +757,8 @@ System.Net/WebRequest.cs
System.Net/WebRequestMethods.cs
System.Net/WebResponse.cs
System/NewsStyleUriParser.cs
+System.Security.AccessControl/SemaphoreAccessRule.cs
+System.Security.AccessControl/SemaphoreAuditRule.cs
System.Security.AccessControl/SemaphoreRights.cs
System.Security.AccessControl/SemaphoreSecurity.cs
System.Security.Authentication/AuthenticationException.cs
diff --git a/mcs/class/corlib/ChangeLog b/mcs/class/corlib/ChangeLog
index ec8320e54f1..0701b7b3a89 100644
--- a/mcs/class/corlib/ChangeLog
+++ b/mcs/class/corlib/ChangeLog
@@ -1,3 +1,60 @@
+2006-07-06 Dick Porter <dick@ximian.com>
+
+ * 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-03 Kornél Pál <kornelpal@gmail.com>
* corlib.dll.sources: Added
diff --git a/mcs/class/corlib/System.Security.AccessControl/AccessControlActions.cs b/mcs/class/corlib/System.Security.AccessControl/AccessControlActions.cs
index 7c9637594e9..823cc38441c 100644
--- a/mcs/class/corlib/System.Security.AccessControl/AccessControlActions.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/AccessControlActions.cs
@@ -4,7 +4,7 @@
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -32,9 +32,9 @@ namespace System.Security.AccessControl {
[Flags]
public enum AccessControlActions {
- None,
- View,
- Change
+ None = 0,
+ View = 1,
+ Change = 2
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/AccessControlModification.cs b/mcs/class/corlib/System.Security.AccessControl/AccessControlModification.cs
new file mode 100644
index 00000000000..e69bf62f5d1
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AccessControlModification.cs
@@ -0,0 +1,42 @@
+//
+// System.Security.AccessControl.AccessControlModification enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public enum AccessControlModification {
+ Add = 0,
+ Set = 1,
+ Reset = 2,
+ Remove = 3,
+ RemoveAll = 4,
+ RemoveSpecific = 5,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AccessControlType.cs b/mcs/class/corlib/System.Security.AccessControl/AccessControlType.cs
new file mode 100644
index 00000000000..5abac1bae39
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AccessControlType.cs
@@ -0,0 +1,38 @@
+//
+// System.Security.AccessControl.AccessControlType enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public enum AccessControlType {
+ Allow = 0,
+ Deny = 1
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AccessRule.cs b/mcs/class/corlib/System.Security.AccessControl/AccessRule.cs
new file mode 100644
index 00000000000..c62437c8ff4
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AccessRule.cs
@@ -0,0 +1,80 @@
+//
+// System.Security.AccessControl.AccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class AccessRule : AuthorizationRule
+ {
+ AccessControlType type;
+
+ protected AccessRule ()
+ {
+ /* Give it a 0-param constructor */
+ }
+
+ protected AccessRule (IdentityReference identity,
+ int accessMask,
+ bool isInherited,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AccessControlType type)
+ : base (identity, accessMask, isInherited,
+ inheritanceFlags, propagationFlags)
+ {
+ if (!(identity is SecurityIdentifier)) {
+ throw new ArgumentException ("identity");
+ }
+ if (type < AccessControlType.Allow ||
+ type > AccessControlType.Deny) {
+ throw new ArgumentException ("type");
+ }
+
+
+ if (accessMask == 0) {
+ /* FIXME: check inheritance and
+ * propagation flags too
+ */
+ throw new ArgumentOutOfRangeException ();
+ }
+
+ this.type = type;
+ }
+
+ public AccessControlType AccessControlType
+ {
+ get {
+ return(type);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AceEnumerator.cs b/mcs/class/corlib/System.Security.AccessControl/AceEnumerator.cs
new file mode 100644
index 00000000000..e15cfeefcec
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AceEnumerator.cs
@@ -0,0 +1,63 @@
+//
+// System.Security.AccessControl.AceEnumerator implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Security.AccessControl {
+ public sealed class AceEnumerator : IEnumerator
+ {
+ public GenericAce Current
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ object IEnumerator.Current
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool MoveNext ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Reset ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AceFlags.cs b/mcs/class/corlib/System.Security.AccessControl/AceFlags.cs
new file mode 100644
index 00000000000..46bf32cff71
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AceFlags.cs
@@ -0,0 +1,47 @@
+//
+// System.Security.AccessControl.AceFlags enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ [Flags]
+ public enum AceFlags : byte {
+ None = 0,
+ ObjectInherit = 0x01,
+ ContainerInherit = 0x02,
+ NoPropagateInherit = 0x04,
+ InheritOnly = 0x08,
+ InheritanceFlags = ObjectInherit | ContainerInherit | NoPropagateInherit | InheritOnly,
+ Inherited = 0x10,
+ SuccessfulAccess = 0x40,
+ FailedAccess = 0x80,
+ AuditFlags = SuccessfulAccess | FailedAccess,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AceQualifier.cs b/mcs/class/corlib/System.Security.AccessControl/AceQualifier.cs
new file mode 100644
index 00000000000..102d85c4df4
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AceQualifier.cs
@@ -0,0 +1,40 @@
+//
+// System.Security.AccessControl.AceQualifier enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public enum AceQualifier {
+ AccessAllowed = 0,
+ AccessDenied = 1,
+ SystemAudit = 2,
+ SystemAlarm = 3,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AceType.cs b/mcs/class/corlib/System.Security.AccessControl/AceType.cs
new file mode 100644
index 00000000000..d562eb81ba1
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AceType.cs
@@ -0,0 +1,54 @@
+//
+// System.Security.AccessControl.AceType enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public enum AceType {
+ AccessAllowed = 0,
+ AccessDenied = 1,
+ SystemAudit = 2,
+ SystemAlarm = 3,
+ AccessAllowedCompound = 4,
+ AccessAllowedObject = 5,
+ AccessDeniedObject = 6,
+ SystemAuditObject = 7,
+ SystemAlarmObject = 8,
+ AccessAllowedCallback = 9,
+ AccessDeniedCallback = 10,
+ AccessAllowedCallbackObject = 11,
+ AccessDeniedCallbackObject = 12,
+ SystemAuditCallback = 13,
+ SystemAlarmCallback = 14,
+ SystemAuditCallbackObject = 15,
+ SystemAlarmCallbackObject = 16,
+ MaxDefinedAceType = 16,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AuditFlags.cs b/mcs/class/corlib/System.Security.AccessControl/AuditFlags.cs
new file mode 100644
index 00000000000..b0b78a5dd37
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AuditFlags.cs
@@ -0,0 +1,40 @@
+//
+// System.Security.AccessControl.AuditFlags enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ [Flags]
+ public enum AuditFlags {
+ None = 0,
+ Success = 1,
+ Failure = 2,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AuditRule.cs b/mcs/class/corlib/System.Security.AccessControl/AuditRule.cs
new file mode 100644
index 00000000000..38fe74f4dcb
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AuditRule.cs
@@ -0,0 +1,76 @@
+//
+// System.Security.AccessControl.AuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class AuditRule : AuthorizationRule
+ {
+ AuditFlags auditFlags;
+
+ protected AuditRule ()
+ {
+ /* Give it a 0-param constructor */
+ }
+
+ protected AuditRule (IdentityReference identity,
+ int accessMask,
+ bool isInherited,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AuditFlags auditFlags)
+ : base (identity, accessMask, isInherited,
+ inheritanceFlags, propagationFlags)
+ {
+ if (!(identity is SecurityIdentifier)) {
+ /* FIXME: check auditFlags too */
+ throw new ArgumentException ("identity");
+ }
+
+ if (accessMask == 0) {
+ /* FIXME: check inheritance and
+ * propagation flags too
+ */
+ throw new ArgumentOutOfRangeException ();
+ }
+
+ this.auditFlags = auditFlags;
+ }
+
+ public AuditFlags AuditFlags
+ {
+ get {
+ return(auditFlags);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AuthorizationRule.cs b/mcs/class/corlib/System.Security.AccessControl/AuthorizationRule.cs
new file mode 100644
index 00000000000..84bcd42e10a
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AuthorizationRule.cs
@@ -0,0 +1,107 @@
+//
+// System.Security.AccessControl.AuthorizationRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class AuthorizationRule
+ {
+ IdentityReference identity;
+ int accessMask;
+ bool isInherited;
+ InheritanceFlags inheritanceFlags;
+ PropagationFlags propagationFlags;
+
+ protected AuthorizationRule ()
+ {
+ /* Give it a 0-param constructor */
+ }
+
+ protected internal AuthorizationRule (IdentityReference identity,
+ int accessMask, bool isInherited,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ if (!(identity is SecurityIdentifier)) {
+ throw new ArgumentException ("identity");
+ }
+
+ if (accessMask == 0) {
+ /* FIXME: check inheritance and
+ * propagation flags too
+ */
+ throw new ArgumentOutOfRangeException ();
+ }
+
+ this.identity = identity;
+ this.accessMask = accessMask;
+ this.isInherited = isInherited;
+ this.inheritanceFlags = inheritanceFlags;
+ this.propagationFlags = propagationFlags;
+ }
+
+ public IdentityReference IdentityReference
+ {
+ get {
+ return(identity);
+ }
+ }
+
+ public InheritanceFlags InheritanceFlags
+ {
+ get {
+ return(inheritanceFlags);
+ }
+ }
+
+ public bool IsInherited
+ {
+ get {
+ return(isInherited);
+ }
+ }
+
+ public PropagationFlags PropagationFlags
+ {
+ get {
+ return(propagationFlags);
+ }
+ }
+
+ protected internal int AccessMask
+ {
+ get {
+ return(accessMask);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs b/mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs
new file mode 100644
index 00000000000..34530407226
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/AuthorizationRuleCollection.cs
@@ -0,0 +1,50 @@
+//
+// System.Security.AccessControl.AuthorizationRuleCollection implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Security.AccessControl {
+ public sealed class AuthorizationRuleCollection : ReadOnlyCollectionBase
+ {
+ public AuthorizationRule this[int index]
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public void CopyTo (AuthorizationRule[] rules, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ChangeLog b/mcs/class/corlib/System.Security.AccessControl/ChangeLog
index c3040a1c30f..78da8ed09b6 100644
--- a/mcs/class/corlib/System.Security.AccessControl/ChangeLog
+++ b/mcs/class/corlib/System.Security.AccessControl/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-06 Dick Porter <dick@ximian.com>
+
+ * Completely stubbed the System.Security.AccessControl namespace
+ for the 2.0 profile.
+
2005-12-23 Dick Porter <dick@ximian.com>
* MutexRights.cs: New for 2.0 profile
diff --git a/mcs/class/corlib/System.Security.AccessControl/CommonAce.cs b/mcs/class/corlib/System.Security.AccessControl/CommonAce.cs
new file mode 100644
index 00000000000..0a8254fed1e
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CommonAce.cs
@@ -0,0 +1,62 @@
+//
+// System.Security.AccessControl.CommonAce implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class CommonAce : QualifiedAce
+ {
+ public CommonAce (AceFlags flags, AceQualifier qualifier,
+ int accessMask, SecurityIdentifier sid,
+ bool isCallback, byte[] opaque)
+ {
+ }
+
+ public override int BinaryLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override void GetBinaryForm (byte[] binaryForm,
+ int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static int MaxOpaqueLength (bool isCallback)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CommonAcl.cs b/mcs/class/corlib/System.Security.AccessControl/CommonAcl.cs
new file mode 100644
index 00000000000..48454e10707
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CommonAcl.cs
@@ -0,0 +1,109 @@
+//
+// System.Security.AccessControl.CommonAcl implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ /* NB: Note the Remarks section in the CommonAcl class docs
+ * concerning ACE management
+ */
+ public abstract class CommonAcl : GenericAcl
+ {
+ public override sealed int BinaryLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override sealed int Count
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsCanonical
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsContainer
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsDS
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override sealed GenericAce this[int index]
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override sealed byte Revision
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override sealed void GetBinaryForm (byte[] binaryForm,
+ int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Purge (SecurityIdentifier sid)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveInheritedAces ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CommonObjectSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/CommonObjectSecurity.cs
index f891264b136..aea982bb0cd 100644
--- a/mcs/class/corlib/System.Security.AccessControl/CommonObjectSecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/CommonObjectSecurity.cs
@@ -4,7 +4,7 @@
// Author:
// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -32,12 +32,89 @@ namespace System.Security.AccessControl {
[MonoTODO ("required for NativeObjectSecurity - implementation is missing")]
public abstract class CommonObjectSecurity : ObjectSecurity {
-
- public CommonObjectSecurity ()
+ protected CommonObjectSecurity ()
{
+ /* Give it a 0-param constructor */
+ }
+
+ protected CommonObjectSecurity (bool isContainer)
+ {
+ }
+
+ public AuthorizationRuleCollection GetAccessRules (bool includeExplicit, bool includeInherited, Type targetType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public AuthorizationRuleCollection GetAuditRules (bool includeExplicit, bool includeInherited, Type targetType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void AddAccessRule (AccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void AddAuditRule (AuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override bool ModifyAccess (AccessControlModification modification, AccessRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override bool ModifyAudit (AccessControlModification modification, AuditRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected bool RemoveAccessRule (AccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAccessRuleAll (AccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAccessRuleSpecific (AccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected bool RemoveAuditRule (AuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAuditRuleAll (AuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAuditRuleSpecific (AuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void ResetAccessRule (AccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void SetAccessRule (AccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void SetAuditRule (AuditRule rule)
+ {
+ throw new NotImplementedException ();
}
-
- // TODO
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs b/mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs
new file mode 100644
index 00000000000..bab13357b7a
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CommonSecurityDescriptor.cs
@@ -0,0 +1,180 @@
+//
+// System.Security.AccessControl.CommonSecurityDescriptor implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class CommonSecurityDescriptor : GenericSecurityDescriptor
+ {
+ bool isContainer;
+ bool isDS;
+ ControlFlags flags;
+ SecurityIdentifier owner;
+ SecurityIdentifier group;
+ SystemAcl systemAcl;
+ DiscretionaryAcl discretionaryAcl;
+
+ public CommonSecurityDescriptor (bool isContainer, bool isDS, RawSecurityDescriptor rawSecurityDescriptor)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public CommonSecurityDescriptor (bool isContainer, bool isDS, string sddlForm)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public CommonSecurityDescriptor (bool isContainer, bool isDS, byte[] binaryForm, int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public CommonSecurityDescriptor (bool isContainer, bool isDS,
+ ControlFlags flags,
+ SecurityIdentifier owner,
+ SecurityIdentifier group,
+ SystemAcl systemAcl,
+ DiscretionaryAcl discretionaryAcl)
+ {
+ this.isContainer = isContainer;
+ this.isDS = isDS;
+ this.flags = flags;
+ this.owner = owner;
+ this.group = group;
+ this.systemAcl = systemAcl;
+ this.discretionaryAcl = discretionaryAcl;
+
+ throw new NotImplementedException ();
+ }
+
+ public override ControlFlags ControlFlags
+ {
+ get {
+ return(flags);
+ }
+ }
+
+ public DiscretionaryAcl DiscretionaryAcl
+ {
+ get {
+ return(discretionaryAcl);
+ }
+ set {
+ if (value == null) {
+ /* FIXME: add a "full access" ACE */
+ }
+
+ discretionaryAcl = value;
+ }
+ }
+
+ public override SecurityIdentifier Group
+ {
+ get {
+ return(group);
+ }
+ set {
+ group = value;
+ }
+ }
+
+ public bool IsContainer
+ {
+ get {
+ return(isContainer);
+ }
+ }
+
+ public bool IsDiscretionaryAclCanonical
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsDS
+ {
+ get {
+ return(isDS);
+ }
+ }
+
+ public bool IsSystemAclCanonical
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override SecurityIdentifier Owner
+ {
+ get {
+ return(owner);
+ }
+ set {
+ owner = value;
+ }
+ }
+
+ public SystemAcl SystemAcl
+ {
+ get {
+ return(systemAcl);
+ }
+ set {
+ systemAcl = value;
+ }
+ }
+
+ public void PurgeAccessControl (SecurityIdentifier sid)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void PurgeAudit (SecurityIdentifier sid)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetDiscretionaryAclProtection (bool isProtected,
+ bool preserveInheritance)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSystemAclProtection (bool isProtected,
+ bool preserveInheritance)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CompoundAce.cs b/mcs/class/corlib/System.Security.AccessControl/CompoundAce.cs
new file mode 100644
index 00000000000..528ff589b97
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CompoundAce.cs
@@ -0,0 +1,72 @@
+//
+// System.Security.AccessControl.CompoundAce implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class CompoundAce : KnownAce
+ {
+ CompoundAceType compoundAceType;
+
+ public CompoundAce (AceFlags flags, int accessMask,
+ CompoundAceType compoundAceType,
+ SecurityIdentifier side)
+ {
+ this.compoundAceType = compoundAceType;
+
+ throw new NotImplementedException ();
+ }
+
+ public override int BinaryLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public CompoundAceType CompoundAceType
+ {
+ get {
+ return(compoundAceType);
+ }
+ set {
+ compoundAceType = value;
+ }
+ }
+
+ public override void GetBinaryForm (byte[] binaryForm,
+ int offset)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CompoundAceType.cs b/mcs/class/corlib/System.Security.AccessControl/CompoundAceType.cs
new file mode 100644
index 00000000000..1da2e6737f8
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CompoundAceType.cs
@@ -0,0 +1,37 @@
+//
+// System.Security.AccessControl.CompoundAceType enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public enum CompoundAceType {
+ Impersonation = 1
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ControlFlags.cs b/mcs/class/corlib/System.Security.AccessControl/ControlFlags.cs
new file mode 100644
index 00000000000..fc3403f0b98
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/ControlFlags.cs
@@ -0,0 +1,54 @@
+//
+// System.Security.AccessControl.ControlFlags enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ [Flags]
+ public enum ControlFlags {
+ None = 0x0000,
+ OwnerDefaulted = 0x0001,
+ GroupDefaulted = 0x0002,
+ DiscretionaryAclPresent = 0x0004,
+ DiscretionaryAclDefaulted = 0x0008,
+ SystemAclPresent = 0x0010,
+ SystemAclDefaulted = 0x0020,
+ DiscretionaryAclUntrusted = 0x0040,
+ ServerSecurity = 0x0080,
+ DiscretionaryAclAutoInheritRequired = 0x0100,
+ SystemAclAutoInheritRequired = 0x0200,
+ DiscretionaryAclAutoInherited = 0x0400,
+ SystemAclAutoInherited = 0x0800,
+ DiscretionaryAclProtected = 0x1000,
+ SystemAclProtected = 0x2000,
+ RMControlValid = 0x4000,
+ SelfRelative = 0x8000,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CryptoKeyAccessRule.cs b/mcs/class/corlib/System.Security.AccessControl/CryptoKeyAccessRule.cs
new file mode 100644
index 00000000000..f2a88157f5d
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CryptoKeyAccessRule.cs
@@ -0,0 +1,61 @@
+//
+// System.Security.AccessControl.CryptoKeyAccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class CryptoKeyAccessRule : AccessRule
+ {
+ CryptoKeyRights cryptoKeyRights;
+
+ public CryptoKeyAccessRule (IdentityReference identity,
+ CryptoKeyRights cryptoKeyRights,
+ AccessControlType type)
+ {
+ this.cryptoKeyRights = cryptoKeyRights;
+ }
+
+ public CryptoKeyAccessRule (string identity,
+ CryptoKeyRights cryptoKeyRights,
+ AccessControlType type)
+ {
+ this.cryptoKeyRights = cryptoKeyRights;
+ }
+
+ public CryptoKeyRights CryptoKeyRights
+ {
+ get {
+ return(cryptoKeyRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CryptoKeyAuditRule.cs b/mcs/class/corlib/System.Security.AccessControl/CryptoKeyAuditRule.cs
new file mode 100644
index 00000000000..f49ab62d5ee
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CryptoKeyAuditRule.cs
@@ -0,0 +1,61 @@
+//
+// System.Security.AccessControl.CryptoKeyAuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class CryptoKeyAuditRule : AuditRule
+ {
+ CryptoKeyRights cryptoKeyRights;
+
+ public CryptoKeyAuditRule (IdentityReference identity,
+ CryptoKeyRights cryptoKeyRights,
+ AuditFlags flags)
+ {
+ this.cryptoKeyRights = cryptoKeyRights;
+ }
+
+ public CryptoKeyAuditRule (string identity,
+ CryptoKeyRights cryptoKeyRights,
+ AuditFlags flags)
+ {
+ this.cryptoKeyRights = cryptoKeyRights;
+ }
+
+ public CryptoKeyRights CryptoKeyRights
+ {
+ get {
+ return(cryptoKeyRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CryptoKeyRights.cs b/mcs/class/corlib/System.Security.AccessControl/CryptoKeyRights.cs
new file mode 100644
index 00000000000..b19b46df428
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CryptoKeyRights.cs
@@ -0,0 +1,54 @@
+//
+// System.Security.AccessControl.CryptoKeyRights enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+
+ [Flags]
+ public enum CryptoKeyRights {
+ ReadData = 0x00000001,
+ WriteData = 0x00000002,
+ ReadExtendedAttributes = 0x00000008,
+ WriteExtendedAttributes = 0x00000010,
+ ReadAttributes = 0x00000080,
+ WriteAttributes = 0x00000100,
+ Delete = 0x00010000,
+ ReadPermissions = 0x00020000,
+ ChangePermissions = 0x00040000,
+ TakeOwnership = 0x00080000,
+ Synchronize = 0x00100000,
+ FullControl = 0x001F019B,
+ GenericAll = 0x10000000,
+ GenericExecute = 0x20000000,
+ GenericWrite = 0x40000000,
+ GenericRead = unchecked((int)0x80000000), /* overflow */
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs b/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs
index ab4f64cec02..17807384703 100644
--- a/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/CryptoKeySecurity.cs
@@ -1,10 +1,11 @@
//
// System.Security.AccessControl.CryptoKeySecurity implementation
//
-// Author:
+// Authors:
// Sebastien Pouliot <sebastien@ximian.com>
+// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,16 +29,106 @@
#if NET_2_0
-namespace System.Security.AccessControl {
-
- [MonoTODO ("required for CspParameters/CspKeyContainerInfo - implementation is missing")]
- public sealed class CryptoKeySecurity {
+using System.Security.Principal;
+namespace System.Security.AccessControl {
+ public sealed class CryptoKeySecurity : NativeObjectSecurity {
+ CommonSecurityDescriptor securityDescriptor;
+
public CryptoKeySecurity ()
{
}
- // TODO
+ public CryptoKeySecurity (CommonSecurityDescriptor securityDescriptor)
+ {
+ this.securityDescriptor = securityDescriptor;
+ }
+
+ public override Type AccessRightType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AccessRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AuditRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override sealed AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccessRule (CryptoKeyAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAuditRule (CryptoKeyAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override sealed AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccessRule (CryptoKeyAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleAll (CryptoKeyAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleSpecific (CryptoKeyAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAuditRule (CryptoKeyAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleAll (CryptoKeyAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleSpecific (CryptoKeyAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetAccessRule (CryptoKeyAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRule (CryptoKeyAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRule (CryptoKeyAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/CustomAce.cs b/mcs/class/corlib/System.Security.AccessControl/CustomAce.cs
new file mode 100644
index 00000000000..5daecf72a97
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/CustomAce.cs
@@ -0,0 +1,82 @@
+//
+// System.Security.AccessControl.CustomAce implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Security.AccessControl {
+ public sealed class CustomAce : GenericAce
+ {
+ public CustomAce (AceType type, AceFlags flags, byte[] opaque)
+ {
+ if (type <= AceType.MaxDefinedAceType) {
+ throw new ArgumentOutOfRangeException ("type");
+ }
+ /* FIXME: check length of opaque >
+ * MaxOpaqueLength or !multiple of 4
+ */
+ //AceType = type;
+ //AceFlags = flags;
+ }
+
+ public static readonly int MaxOpaqueLength;
+
+ public override int BinaryLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int OpaqueLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override void GetBinaryForm (byte[] binaryForm,
+ int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public byte[] GetOpaque ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetOpaque (byte[] opaque)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/DirectoryObjectSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/DirectoryObjectSecurity.cs
new file mode 100644
index 00000000000..8e4fde72678
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/DirectoryObjectSecurity.cs
@@ -0,0 +1,130 @@
+//
+// System.Security.AccessControl.DirectoryObjectSecurity implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class DirectoryObjectSecurity : ObjectSecurity {
+ protected DirectoryObjectSecurity ()
+ {
+ }
+
+ protected DirectoryObjectSecurity (CommonSecurityDescriptor securityDescriptor)
+ {
+ }
+
+ public virtual AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type, Guid objectType, Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags, Guid objectType, Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public AuthorizationRuleCollection GetAccessRules (bool includeExplicit, bool includeInherited, Type targetType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public AuthorizationRuleCollection GetAuditRules (bool includeExplicit, bool includeInherited, Type targetType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void AddAccessRule (ObjectAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void AddAuditRule (ObjectAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override bool ModifyAccess (AccessControlModification modification, AccessRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override bool ModifyAudit (AccessControlModification modification, AuditRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected bool RemoveAccessRule (ObjectAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAccessRuleAll (ObjectAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAccessRuleSpecific (ObjectAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected bool RemoveAuditRule (ObjectAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAuditRuleAll (ObjectAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void RemoveAuditRuleSpecific (ObjectAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void ResetAccessRule (ObjectAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void SetAccessRule (ObjectAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void SetAuditRule (ObjectAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/DirectorySecurity.cs b/mcs/class/corlib/System.Security.AccessControl/DirectorySecurity.cs
index 01f40dca170..41bd9ac36eb 100644
--- a/mcs/class/corlib/System.Security.AccessControl/DirectorySecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/DirectorySecurity.cs
@@ -1,10 +1,11 @@
//
// System.Security.AccessControl.DirectorySecurity implementation
//
-// Author:
+// Authors:
// Sebastien Pouliot <sebastien@ximian.com>
+// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,16 +30,16 @@
#if NET_2_0
namespace System.Security.AccessControl {
-
- [MonoTODO ("required for System.IO.DirectoryInfo - implementation is missing")]
- public sealed class DirectorySecurity {
-
+ public sealed class DirectorySecurity : FileSystemSecurity {
public DirectorySecurity ()
{
throw new PlatformNotSupportedException ();
}
- // TODO
+ public DirectorySecurity (string name, AccessControlSections includeSections)
+ {
+ throw new PlatformNotSupportedException ();
+ }
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs b/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs
new file mode 100644
index 00000000000..39a7fd511c1
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/DiscretionaryAcl.cs
@@ -0,0 +1,138 @@
+//
+// System.Security.AccessControl.DiscretionaryAcl implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class DiscretionaryAcl : CommonAcl
+ {
+ public DiscretionaryAcl (bool isContainer, bool isDS,
+ int capacity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DiscretionaryAcl (bool isContainer, bool isDS,
+ RawAcl rawAcl)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DiscretionaryAcl (bool isContainer, bool isDS,
+ byte revision, int capacity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccess (AccessControlType accessType,
+ SecurityIdentifier sid, int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccess (AccessControlType accessType,
+ SecurityIdentifier sid, int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccess (AccessControlType accessType,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccess (AccessControlType accessType,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessSpecific (AccessControlType accessType,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessSpecific (AccessControlType accessType,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccess (AccessControlType accessType,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccess (AccessControlType accessType,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAccessRule.cs b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAccessRule.cs
new file mode 100644
index 00000000000..59395b55973
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAccessRule.cs
@@ -0,0 +1,61 @@
+//
+// System.Security.AccessControl.EventWaitHandleAccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class EventWaitHandleAccessRule : AccessRule
+ {
+ EventWaitHandleRights eventRights;
+
+ public EventWaitHandleAccessRule (IdentityReference identity,
+ EventWaitHandleRights eventRights,
+ AccessControlType type)
+ {
+ this.eventRights = eventRights;
+ }
+
+ public EventWaitHandleAccessRule (string identity,
+ EventWaitHandleRights eventRights,
+ AccessControlType type)
+ {
+ this.eventRights = eventRights;
+ }
+
+ public EventWaitHandleRights EventWaitHandleRights
+ {
+ get {
+ return(eventRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAuditRule.cs b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAuditRule.cs
new file mode 100644
index 00000000000..dde548a03f4
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleAuditRule.cs
@@ -0,0 +1,75 @@
+//
+// System.Security.AccessControl.EventWaitHandleAuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class EventWaitHandleAuditRule : AuditRule
+ {
+ EventWaitHandleRights eventRights;
+
+ public EventWaitHandleAuditRule (IdentityReference identity,
+ EventWaitHandleRights eventRights,
+ AuditFlags flags)
+ {
+ if (eventRights < EventWaitHandleRights.Modify ||
+ eventRights > EventWaitHandleRights.FullControl) {
+ throw new ArgumentOutOfRangeException ("eventRights");
+ }
+ if (flags < AuditFlags.None ||
+ flags > AuditFlags.Failure) {
+ throw new ArgumentOutOfRangeException ("flags");
+ }
+ if (identity == null) {
+ throw new ArgumentNullException ("identity");
+ }
+ if (eventRights == 0) {
+ throw new ArgumentNullException ("eventRights");
+ }
+ if (flags == AuditFlags.None) {
+ throw new ArgumentException ("flags");
+ }
+ if (!(identity is SecurityIdentifier)) {
+ throw new ArgumentException ("identity");
+ }
+
+ this.eventRights = eventRights;
+ }
+
+ public EventWaitHandleRights EventWaitHandleRights
+ {
+ get {
+ return(eventRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleRights.cs b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleRights.cs
index 3db6be4f225..14fc10cb4f5 100644
--- a/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleRights.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleRights.cs
@@ -4,7 +4,7 @@
// Author:
// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleSecurity.cs
index ade8432bc07..eadbfcf363a 100644
--- a/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleSecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/EventWaitHandleSecurity.cs
@@ -4,7 +4,7 @@
// Author:
// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,16 +28,100 @@
#if NET_2_0
-namespace System.Security.AccessControl {
+using System.Security.Principal;
- [MonoTODO ("required for EventWaitHandle - implementation is missing")]
+namespace System.Security.AccessControl {
public sealed class EventWaitHandleSecurity : NativeObjectSecurity {
-
public EventWaitHandleSecurity ()
{
+ throw new NotImplementedException ();
+ }
+
+ public override Type AccessRightType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AccessRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AuditRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccessRule (EventWaitHandleAccessRule rule)
+ {
+ throw new NotImplementedException ();
}
- // TODO
+ public void AddAuditRule (EventWaitHandleAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccessRule (EventWaitHandleAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleAll (EventWaitHandleAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleSpecific (EventWaitHandleAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAuditRule (EventWaitHandleAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleAll (EventWaitHandleAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleSpecific (EventWaitHandleAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetAccessRule (EventWaitHandleAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRule (EventWaitHandleAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRule (EventWaitHandleAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/FileSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/FileSecurity.cs
new file mode 100644
index 00000000000..e72559ab0aa
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/FileSecurity.cs
@@ -0,0 +1,46 @@
+//
+// System.Security.AccessControl.FileSecurity implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public sealed class FileSecurity : FileSystemSecurity {
+ public FileSecurity ()
+ {
+ throw new PlatformNotSupportedException ();
+ }
+
+ public FileSecurity (string fileName,
+ AccessControlSections includeSections)
+ {
+ throw new PlatformNotSupportedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/FileSystemAccessRule.cs b/mcs/class/corlib/System.Security.AccessControl/FileSystemAccessRule.cs
new file mode 100644
index 00000000000..59c2b633913
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/FileSystemAccessRule.cs
@@ -0,0 +1,79 @@
+//
+// System.Security.AccessControl.FileSystemAccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class FileSystemAccessRule : AccessRule
+ {
+ FileSystemRights fileSystemRights;
+
+ public FileSystemAccessRule (IdentityReference identity,
+ FileSystemRights fileSystemRights,
+ AccessControlType type)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemAccessRule (string identity,
+ FileSystemRights fileSystemRights,
+ AccessControlType type)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemAccessRule (IdentityReference identity,
+ FileSystemRights fileSystemRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AccessControlType type)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemAccessRule (string identity,
+ FileSystemRights fileSystemRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AccessControlType type)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemRights FileSystemRights
+ {
+ get {
+ return(fileSystemRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/FileSystemAuditRule.cs b/mcs/class/corlib/System.Security.AccessControl/FileSystemAuditRule.cs
new file mode 100644
index 00000000000..4fe3694d547
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/FileSystemAuditRule.cs
@@ -0,0 +1,79 @@
+//
+// System.Security.AccessControl.FileSystemAuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class FileSystemAuditRule : AuditRule
+ {
+ FileSystemRights fileSystemRights;
+
+ public FileSystemAuditRule (IdentityReference identity,
+ FileSystemRights fileSystemRights,
+ AuditFlags flags)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemAuditRule (string identity,
+ FileSystemRights fileSystemRights,
+ AuditFlags flags)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemAuditRule (IdentityReference identity,
+ FileSystemRights fileSystemRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AuditFlags flags)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemAuditRule (string identity,
+ FileSystemRights fileSystemRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AuditFlags flags)
+ {
+ this.fileSystemRights = fileSystemRights;
+ }
+
+ public FileSystemRights FileSystemRights
+ {
+ get {
+ return(fileSystemRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/FileSystemRights.cs b/mcs/class/corlib/System.Security.AccessControl/FileSystemRights.cs
new file mode 100644
index 00000000000..8dc57aacf4f
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/FileSystemRights.cs
@@ -0,0 +1,61 @@
+//
+// System.Security.AccessControl.FileSystemRights enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+
+ [Flags]
+ public enum FileSystemRights {
+ ListDirectory = 0x0000001,
+ ReadData = 0x0000001,
+ CreateFiles = 0x0000002,
+ WriteData = 0x0000002,
+ AppendData = 0x0000004,
+ CreateDirectories = 0x0000004,
+ ReadExtendedAttributes = 0x0000008,
+ WriteExtendedAttributes = 0x0000010,
+ ExecuteFile = 0x0000020,
+ Traverse = 0x0000020,
+ DeleteSubdirectoriesAndFiles = 0x0000040,
+ ReadAttributes = 0x0000080,
+ WriteAttributes = 0x0000100,
+ Write = 0x0000116,
+ Delete = 0x0010000,
+ ReadPermissions = 0x0020000,
+ Read = 0x0020089,
+ ReadAndExecute = 0x00200A9,
+ Modify = 0x00301BF,
+ ChangePermissions = 0x0040000,
+ TakeOwnership = 0x0080000,
+ Synchronize = 0x0100000,
+ FullControl = 0x01F01FF,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/FileSystemSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/FileSystemSecurity.cs
new file mode 100644
index 00000000000..389b45066fe
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/FileSystemSecurity.cs
@@ -0,0 +1,123 @@
+//
+// System.Security.AccessControl.FileSystemSecurity implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class FileSystemSecurity : NativeObjectSecurity {
+ public override Type AccessRightType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AccessRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AuditRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override sealed AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccessRule (FileSystemAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAuditRule (FileSystemAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override sealed AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccessRule (FileSystemAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleAll (FileSystemAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleSpecific (FileSystemAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAuditRule (FileSystemAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleAll (FileSystemAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleSpecific (FileSystemAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetAccessRule (FileSystemAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRule (FileSystemAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRule (FileSystemAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/GenericAce.cs b/mcs/class/corlib/System.Security.AccessControl/GenericAce.cs
new file mode 100644
index 00000000000..c3794301387
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/GenericAce.cs
@@ -0,0 +1,132 @@
+//
+// System.Security.AccessControl.GenericAce implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Security.AccessControl {
+ public abstract class GenericAce
+ {
+ AceFlags aceflags;
+
+ public AceFlags AceFlags
+ {
+ get {
+ return(aceflags);
+ }
+ set {
+ aceflags = value;
+ }
+ }
+
+ AceType type;
+
+ public AceType AceType
+ {
+ get {
+ return(type);
+ }
+ }
+
+ AuditFlags auditflags;
+
+ public AuditFlags AuditFlags
+ {
+ get {
+ return(auditflags);
+ }
+ }
+
+ public abstract int BinaryLength
+ {
+ get;
+ }
+
+ InheritanceFlags inheritanceflags;
+
+ public InheritanceFlags InheritanceFlags
+ {
+ get {
+ return(inheritanceflags);
+ }
+ }
+
+ public bool IsInherited
+ {
+ get {
+ return(false);
+ }
+ }
+
+ PropagationFlags propagationflags;
+
+ public PropagationFlags PropagationFlags
+ {
+ get {
+ return(propagationflags);
+ }
+ }
+
+ public GenericAce Copy ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static GenericAce CreateFromBinaryForm (byte[] binaryForm, int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override sealed bool Equals (object o)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public abstract void GetBinaryForm (byte[] binaryForm, int offset);
+
+ public override sealed int GetHashCode ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool operator== (GenericAce left,
+ GenericAce right)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool operator!= (GenericAce left,
+ GenericAce right)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/GenericAcl.cs b/mcs/class/corlib/System.Security.AccessControl/GenericAcl.cs
new file mode 100644
index 00000000000..9bc85d7d9db
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/GenericAcl.cs
@@ -0,0 +1,103 @@
+//
+// System.Security.AccessControl.GenericAcl implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Security.AccessControl {
+ public abstract class GenericAcl : ICollection, IEnumerable
+ {
+ protected GenericAcl ()
+ {
+ }
+
+ public static readonly byte AclRevision;
+ public static readonly byte AclRevisionDS;
+ public static readonly int MaxBinaryLength;
+
+ public abstract int BinaryLength
+ {
+ get;
+ }
+
+ public abstract int Count
+ {
+ get;
+ }
+
+ public bool IsSynchronized
+ {
+ get {
+ return(false);
+ }
+ }
+
+ public abstract GenericAce this[int index]
+ {
+ get;
+ set;
+ }
+
+ public abstract byte Revision
+ {
+ get;
+ }
+
+ public object SyncRoot
+ {
+ get {
+ return(null);
+ }
+ }
+
+ public void CopyTo (GenericAce[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ void ICollection.CopyTo (Array array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+
+ public abstract void GetBinaryForm (byte[] binaryForm, int offset);
+ public AceEnumerator GetEnumerator ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs b/mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs
new file mode 100644
index 00000000000..c4324ee1d71
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/GenericSecurityDescriptor.cs
@@ -0,0 +1,96 @@
+//
+// System.Security.AccessControl.GenericSecurityDescriptor implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class GenericSecurityDescriptor
+ {
+ bool isContainer;
+ bool isDS;
+ ControlFlags flags;
+ SecurityIdentifier owner;
+ SecurityIdentifier group;
+ SystemAcl systemAcl;
+ DiscretionaryAcl discretionaryAcl;
+
+ protected GenericSecurityDescriptor ()
+ {
+ }
+
+ public int BinaryLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public abstract ControlFlags ControlFlags
+ {
+ get;
+ }
+
+ public abstract SecurityIdentifier Group
+ {
+ get;
+ set;
+ }
+
+ public abstract SecurityIdentifier Owner
+ {
+ get;
+ set;
+ }
+
+ public static byte Revision
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public void GetBinaryForm (byte[] binaryForm, int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public string GetSddlForm (AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool IsSddlConversionSupported ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/InheritanceFlags.cs b/mcs/class/corlib/System.Security.AccessControl/InheritanceFlags.cs
new file mode 100644
index 00000000000..7b565762b84
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/InheritanceFlags.cs
@@ -0,0 +1,40 @@
+//
+// System.Security.AccessControl.InheritanceFlags enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ [Flags]
+ public enum InheritanceFlags {
+ None = 0,
+ ContainerInherit = 1,
+ ObjectInherit = 2,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/KnownAce.cs b/mcs/class/corlib/System.Security.AccessControl/KnownAce.cs
new file mode 100644
index 00000000000..e3d08ea86b9
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/KnownAce.cs
@@ -0,0 +1,58 @@
+//
+// System.Security.AccessControl.KnownAce implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class KnownAce : GenericAce
+ {
+ public int AccessMask
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SecurityIdentifier SecurityIdentifier
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/MutexAccessRule.cs b/mcs/class/corlib/System.Security.AccessControl/MutexAccessRule.cs
new file mode 100644
index 00000000000..779444f8fde
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/MutexAccessRule.cs
@@ -0,0 +1,61 @@
+//
+// System.Security.AccessControl.MutexAccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class MutexAccessRule : AccessRule
+ {
+ MutexRights mutexRights;
+
+ public MutexAccessRule (IdentityReference identity,
+ MutexRights mutexRights,
+ AccessControlType type)
+ {
+ this.mutexRights = mutexRights;
+ }
+
+ public MutexAccessRule (string identity,
+ MutexRights mutexRights,
+ AccessControlType type)
+ {
+ this.mutexRights = mutexRights;
+ }
+
+ public MutexRights MutexRights
+ {
+ get {
+ return(mutexRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/MutexAuditRule.cs b/mcs/class/corlib/System.Security.AccessControl/MutexAuditRule.cs
new file mode 100644
index 00000000000..0980d2edb01
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/MutexAuditRule.cs
@@ -0,0 +1,54 @@
+//
+// System.Security.AccessControl.MutexAuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class MutexAuditRule : AuditRule
+ {
+ MutexRights mutexRights;
+
+ public MutexAuditRule (IdentityReference identity,
+ MutexRights mutexRights,
+ AuditFlags flags)
+ {
+ this.mutexRights = mutexRights;
+ }
+
+ public MutexRights MutexRights
+ {
+ get {
+ return(mutexRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/MutexSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/MutexSecurity.cs
index 996b19d5bfb..c4024c1ad35 100644
--- a/mcs/class/corlib/System.Security.AccessControl/MutexSecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/MutexSecurity.cs
@@ -4,7 +4,7 @@
// Author:
// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,16 +28,104 @@
#if NET_2_0
-namespace System.Security.AccessControl {
-
- [MonoTODO ("required for System.Threading.Mutex - implementation is missing")]
- public sealed class MutexSecurity {
+using System.Security.Principal;
+namespace System.Security.AccessControl {
+ public sealed class MutexSecurity : NativeObjectSecurity {
public MutexSecurity ()
{
}
- // TODO
+ public MutexSecurity (string name,
+ AccessControlSections includeSections)
+ {
+ }
+
+ public override Type AccessRightType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AccessRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AuditRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccessRule (MutexAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAuditRule (MutexAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccessRule (MutexAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleAll (MutexAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleSpecific (MutexAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAuditRule (MutexAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleAll (MutexAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleSpecific (MutexAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetAccessRule (MutexAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRule (MutexAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRule (MutexAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/NativeObjectSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/NativeObjectSecurity.cs
index 7a921549cf8..e9ea241d01b 100644
--- a/mcs/class/corlib/System.Security.AccessControl/NativeObjectSecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/NativeObjectSecurity.cs
@@ -4,7 +4,7 @@
// Author:
// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,16 +28,86 @@
#if NET_2_0
-namespace System.Security.AccessControl {
+using System.Runtime.InteropServices;
- [MonoTODO ("required for EventWaitHandleSecurity - implementation is missing")]
+namespace System.Security.AccessControl {
public abstract class NativeObjectSecurity : CommonObjectSecurity {
-
- public NativeObjectSecurity ()
+ protected internal delegate Exception ExceptionFromErrorCode (int errorCode, string name, SafeHandle handle, object context);
+
+ protected NativeObjectSecurity ()
+ {
+ /* Give it a 0-param constructor */
+ }
+
+ protected NativeObjectSecurity (bool isContainer,
+ ResourceType resourceType)
{
}
- // TODO
+ protected NativeObjectSecurity (bool isContainer,
+ ResourceType resourceType,
+ ExceptionFromErrorCode exceptionFromErrorCode,
+ object exceptionContext)
+ {
+ }
+
+ protected NativeObjectSecurity (bool isContainer,
+ ResourceType resourceType,
+ SafeHandle handle,
+ AccessControlSections includeSections)
+ {
+ }
+
+ protected NativeObjectSecurity (bool isContainer,
+ ResourceType resourceType,
+ string name,
+ AccessControlSections includeSections)
+ {
+ }
+
+ protected NativeObjectSecurity (bool isContainer,
+ ResourceType resourceType,
+ SafeHandle handle,
+ AccessControlSections includeSections,
+ ExceptionFromErrorCode exceptionFromErrorCode,
+ object exceptionContext)
+ {
+ }
+
+ protected NativeObjectSecurity (bool isContainer,
+ ResourceType resourceType,
+ string name,
+ AccessControlSections includeSections,
+ ExceptionFromErrorCode exceptionFromErrorCode,
+ object exceptionContext)
+ {
+ }
+
+ protected override sealed void Persist (SafeHandle handle,
+ AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override sealed void Persist (string name,
+ AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void Persist (SafeHandle handle,
+ AccessControlSections includeSections,
+ object exceptionContext)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void Persist (string name,
+ AccessControlSections includeSections,
+ object exceptionContext)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectAccessRule.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectAccessRule.cs
new file mode 100644
index 00000000000..e68ad9da243
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/ObjectAccessRule.cs
@@ -0,0 +1,69 @@
+//
+// System.Security.AccessControl.ObjectAccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class ObjectAccessRule : AccessRule
+ {
+ protected ObjectAccessRule (IdentityReference identity,
+ int accessMask, bool isInherited,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ Guid objectType,
+ Guid inheritedObjectType,
+ AccessControlType type)
+ {
+ }
+
+ public Guid InheritedObjectType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ObjectAceFlags ObjectFlags
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid ObjectType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectAce.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectAce.cs
new file mode 100644
index 00000000000..a17f6533c14
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/ObjectAce.cs
@@ -0,0 +1,95 @@
+//
+// System.Security.AccessControl.ObjectAce implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class ObjectAce : QualifiedAce
+ {
+ public ObjectAce (AceFlags aceFlags, AceQualifier qualifier,
+ int accessMask, SecurityIdentifier sid,
+ ObjectAceFlags flags, Guid type,
+ Guid inheritedType, bool isCallback,
+ byte[] opaque)
+ {
+ }
+
+ public override int BinaryLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid InheritedObjectAceType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ObjectAceFlags ObjectAceFlags
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid ObjectAceType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+
+ public override void GetBinaryForm (byte[] binaryForm,
+ int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static int MaxOpaqueLength (bool isCallback)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectAceFlags.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectAceFlags.cs
new file mode 100644
index 00000000000..a720e378b8f
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/ObjectAceFlags.cs
@@ -0,0 +1,40 @@
+//
+// System.Security.AccessControl.ObjectAceFlags enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ [Flags]
+ public enum ObjectAceFlags {
+ None = 0,
+ ObjectAceTypePresent = 1,
+ InheritedObjectAceTypePresent = 2,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectAuditRule.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectAuditRule.cs
new file mode 100644
index 00000000000..2d06cf0613e
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/ObjectAuditRule.cs
@@ -0,0 +1,69 @@
+//
+// System.Security.AccessControl.ObjectAuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public abstract class ObjectAuditRule : AuditRule
+ {
+ protected ObjectAuditRule (IdentityReference identity,
+ int accessMask, bool isInherited,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ Guid objectType,
+ Guid inheritedObjectType,
+ AuditFlags auditFlags)
+ {
+ }
+
+ public Guid InheritedObjectType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ObjectAceFlags ObjectFlags
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid ObjectType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
index d2d59adc14a..e38681e3236 100644
--- a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
@@ -4,7 +4,7 @@
// Author:
// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,16 +28,246 @@
#if NET_2_0
-namespace System.Security.AccessControl {
+using System.Security.Principal;
+using System.Runtime.InteropServices;
- [MonoTODO ("required for CommonObjectSecurity - implementation is missing")]
+namespace System.Security.AccessControl {
public abstract class ObjectSecurity {
+ protected ObjectSecurity ()
+ {
+ /* Give it a 0-param constructor */
+ }
+
+ protected ObjectSecurity (bool isContainer, bool isDS)
+ {
+ }
- public ObjectSecurity ()
+ public abstract Type AccessRightType
+ {
+ get;
+ }
+
+ public abstract Type AccessRuleType
+ {
+ get;
+ }
+
+ public bool AreAccessRulesCanonical
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool AreAccessRulesProtected
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool AreAuditRulesCanonical
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool AreAuditRulesProtected
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public abstract Type AuditRuleType
+ {
+ get;
+ }
+
+ protected bool AccessRulesModified
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected bool AuditRulesModified
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected bool GroupModified
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected bool IsContainer
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected bool IsDS
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected bool OwnerModified
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public abstract AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type);
+
+ public abstract AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags);
+
+ public IdentityReference GetGroup (Type targetType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public IdentityReference GetOwner (Type targetType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public byte[] GetSecurityDescriptorBinaryForm ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public string GetSecurityDescriptorSddlForm (AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool IsSddlConversionSupported ()
{
+ throw new NotImplementedException ();
+ }
+
+ public virtual bool ModifyAccessRule (AccessControlModification modification, AccessRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual bool ModifyAuditRule (AccessControlModification modification, AuditRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void PurgeAccessRules (IdentityReference identity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void PurgeAuditRules (IdentityReference identity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRuleProtection (bool isProtected,
+ bool preserveInheritance)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRuleProtection (bool isProtected,
+ bool preserveInheritance)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetGroup (IdentityReference identity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetOwner (IdentityReference identity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSecurityDescriptorBinaryForm (byte[] binaryForm)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSecurityDescriptorBinaryForm (byte[] binaryForm, AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSecurityDescriptorSddlForm (string sddlForm)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSecurityDescriptorSddlForm (string sddlForm, AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected abstract bool ModifyAccess (AccessControlModification modification, AccessRule rule, out bool modified);
+
+ protected abstract bool ModifyAudit (AccessControlModification modification, AuditRule rule, out bool modified);
+
+ protected virtual void Persist (SafeHandle handle, AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected virtual void Persist (string name, AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
}
- // TODO
+ protected virtual void Persist (bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void ReadLock ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void ReadUnlock ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void WriteLock ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected void WriteUnlock ()
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/corlib/System.Security.AccessControl/PrivilegeNotHeldException.cs b/mcs/class/corlib/System.Security.AccessControl/PrivilegeNotHeldException.cs
new file mode 100644
index 00000000000..7bf75bd7e59
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/PrivilegeNotHeldException.cs
@@ -0,0 +1,71 @@
+//
+// System.Security.AccessControl.PrivilegeNotHeldException class
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Runtime.InteropServices;
+using System.Runtime.Serialization;
+using System.Security.Permissions;
+
+namespace System.Security {
+
+ [Serializable]
+ public sealed class PrivilegeNotHeldException : UnauthorizedAccessException, ISerializable
+ {
+ public PrivilegeNotHeldException ()
+ {
+ }
+
+ public PrivilegeNotHeldException (string privilege)
+ : base (privilege)
+ {
+ }
+
+ public PrivilegeNotHeldException (string privilege,
+ Exception inner)
+ : base (privilege, inner)
+ {
+ }
+
+ public string PrivilegeName
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [MonoTODO]
+ public override void GetObjectData (SerializationInfo info,
+ StreamingContext context)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/PropagationFlags.cs b/mcs/class/corlib/System.Security.AccessControl/PropagationFlags.cs
new file mode 100644
index 00000000000..cd7d5d2279c
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/PropagationFlags.cs
@@ -0,0 +1,40 @@
+//
+// System.Security.AccessControl.PropagationFlags enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ [Flags]
+ public enum PropagationFlags {
+ None = 0,
+ NoPropagateInherit = 1,
+ InheritOnly = 2,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/QualifiedAce.cs b/mcs/class/corlib/System.Security.AccessControl/QualifiedAce.cs
new file mode 100644
index 00000000000..39401593cec
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/QualifiedAce.cs
@@ -0,0 +1,67 @@
+//
+// System.Security.AccessControl.QualifiedAce implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public abstract class QualifiedAce : KnownAce
+ {
+ public AceQualifier AceQualifier
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsCallback
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int OpaqueLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public byte[] GetOpaque ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetOpaque (byte[] opaque)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/RawAcl.cs b/mcs/class/corlib/System.Security.AccessControl/RawAcl.cs
new file mode 100644
index 00000000000..b3b07f50d62
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/RawAcl.cs
@@ -0,0 +1,91 @@
+//
+// System.Security.AccessControl.RawAcl implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public sealed class RawAcl : GenericAcl
+ {
+ public RawAcl (byte revision, int capacity)
+ {
+ }
+
+ public RawAcl (byte[] binaryForm, int offset)
+ {
+ }
+
+ public override int BinaryLength
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override int Count
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override GenericAce this[int index]
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override byte Revision
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override void GetBinaryForm (byte[] binaryForm,
+ int offset)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void InsertAce (int index, GenericAce ace)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAce (int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/RawSecurityDescriptor.cs b/mcs/class/corlib/System.Security.AccessControl/RawSecurityDescriptor.cs
new file mode 100644
index 00000000000..9425673d232
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/RawSecurityDescriptor.cs
@@ -0,0 +1,116 @@
+//
+// System.Security.AccessControl.RawSecurityDescriptor implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class RawSecurityDescriptor : GenericSecurityDescriptor
+ {
+ public RawSecurityDescriptor (string sddlForm)
+ {
+ }
+
+ public RawSecurityDescriptor (byte[] binaryForm, int offset)
+ {
+ }
+
+ public RawSecurityDescriptor (ControlFlags flags,
+ SecurityIdentifier owner,
+ SecurityIdentifier group,
+ RawAcl systemAcl,
+ RawAcl discretionaryAcl)
+ {
+ }
+
+ public override ControlFlags ControlFlags
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public RawAcl DiscretionaryAcl
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override SecurityIdentifier Group
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override SecurityIdentifier Owner
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public byte ResourceManagerControl
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public RawAcl SystemAcl
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public void SetFlags (ControlFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/RegistryAccessRule.cs b/mcs/class/corlib/System.Security.AccessControl/RegistryAccessRule.cs
new file mode 100644
index 00000000000..9f81acd8493
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/RegistryAccessRule.cs
@@ -0,0 +1,79 @@
+//
+// System.Security.AccessControl.RegistryAccessRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class RegistryAccessRule : AccessRule
+ {
+ RegistryRights registryRights;
+
+ public RegistryAccessRule (IdentityReference identity,
+ RegistryRights registryRights,
+ AccessControlType type)
+ {
+ this.registryRights = registryRights;
+ }
+
+ public RegistryAccessRule (string identity,
+ RegistryRights registryRights,
+ AccessControlType type)
+ {
+ this.registryRights = registryRights;
+ }
+
+ public RegistryAccessRule (IdentityReference identity,
+ RegistryRights registryRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AccessControlType type)
+ {
+ this.registryRights = registryRights;
+ }
+
+ public RegistryAccessRule (string identity,
+ RegistryRights registryRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AccessControlType type)
+ {
+ this.registryRights = registryRights;
+ }
+
+ public RegistryRights RegistryRights
+ {
+ get {
+ return(registryRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/RegistryAuditRule.cs b/mcs/class/corlib/System.Security.AccessControl/RegistryAuditRule.cs
new file mode 100644
index 00000000000..46cf5c27d6b
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/RegistryAuditRule.cs
@@ -0,0 +1,65 @@
+//
+// System.Security.AccessControl.RegistryAuditRule implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class RegistryAuditRule : AuditRule
+ {
+ RegistryRights registryRights;
+
+ public RegistryAuditRule (IdentityReference identity,
+ RegistryRights registryRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AuditFlags flags)
+ {
+ this.registryRights = registryRights;
+ }
+
+ public RegistryAuditRule (string identity,
+ RegistryRights registryRights,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ AuditFlags flags)
+ {
+ this.registryRights = registryRights;
+ }
+
+ public RegistryRights RegistryRights
+ {
+ get {
+ return(registryRights);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/RegistryRights.cs b/mcs/class/corlib/System.Security.AccessControl/RegistryRights.cs
new file mode 100644
index 00000000000..38e5ae65531
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/RegistryRights.cs
@@ -0,0 +1,52 @@
+//
+// System.Security.AccessControl.RegistryRights enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+
+ [Flags]
+ public enum RegistryRights {
+ QueryValues = 0x00001,
+ SetValue = 0x00002,
+ CreateSubKey = 0x00004,
+ EnumerateSubKeys = 0x00008,
+ Notify = 0x00010,
+ CreateLink = 0x00020,
+ Delete = 0x10000,
+ ReadPermissions = 0x20000,
+ WriteKey = 0x20006,
+ ReadKey = 0x20019,
+ ExecuteKey = 0x20019,
+ ChangePermissions = 0x40000,
+ TakeOwnership = 0x80000,
+ FullControl = 0xF003F,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/RegistrySecurity.cs b/mcs/class/corlib/System.Security.AccessControl/RegistrySecurity.cs
new file mode 100644
index 00000000000..ccd90ac626b
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/RegistrySecurity.cs
@@ -0,0 +1,127 @@
+//
+// System.Security.AccessControl.RegistrySecurity implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class RegistrySecurity : NativeObjectSecurity {
+ public RegistrySecurity ()
+ {
+ }
+
+ public override Type AccessRightType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AccessRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AuditRuleType
+ {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAccessRule (RegistryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAuditRule (RegistryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccessRule (RegistryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleAll (RegistryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleSpecific (RegistryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAuditRule (RegistryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleAll (RegistryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleSpecific (RegistryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetAccessRule (RegistryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRule (RegistryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRule (RegistryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ResourceType.cs b/mcs/class/corlib/System.Security.AccessControl/ResourceType.cs
new file mode 100644
index 00000000000..ba55c945eca
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/ResourceType.cs
@@ -0,0 +1,49 @@
+//
+// System.Security.AccessControl.ResourceType enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ public enum ResourceType {
+ Unknown = 0,
+ FileObject = 1,
+ Service = 2,
+ Printer = 3,
+ RegistryKey = 4,
+ LMShare = 5,
+ KernelObject = 6,
+ WindowObject = 7,
+ DSObject = 8,
+ DSObjectAll = 9,
+ ProviderDefined = 10,
+ WmiGuidObject = 11,
+ RegistryWow6432Key = 12,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/SecurityInfos.cs b/mcs/class/corlib/System.Security.AccessControl/SecurityInfos.cs
new file mode 100644
index 00000000000..77d9ce76eea
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/SecurityInfos.cs
@@ -0,0 +1,41 @@
+//
+// System.Security.AccessControl.SecurityInfos enum
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Security.AccessControl {
+ [Flags]
+ public enum SecurityInfos {
+ Owner = 0x1,
+ Group = 0x2,
+ DiscretionaryAcl = 0x4,
+ SystemAcl = 0x8,
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs b/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs
new file mode 100644
index 00000000000..fe169e680d9
--- /dev/null
+++ b/mcs/class/corlib/System.Security.AccessControl/SystemAcl.cs
@@ -0,0 +1,133 @@
+//
+// System.Security.AccessControl.SystemAcl implementation
+//
+// Author:
+// Dick Porter <dick@ximian.com>
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Security.Principal;
+
+namespace System.Security.AccessControl {
+ public sealed class SystemAcl : CommonAcl
+ {
+ public SystemAcl (bool isContainer, bool isDS, int capacity)
+ {
+ }
+
+ public SystemAcl (bool isContainer, bool isDS, RawAcl rawAcl)
+ {
+ }
+
+ public SystemAcl (bool isContainer, bool isDS, byte revision,
+ int capacity)
+ {
+ }
+
+ public void AddAudit (AuditFlags auditFlags,
+ SecurityIdentifier sid, int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAudit (AuditFlags auditFlags,
+ SecurityIdentifier sid, int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAudit (AuditFlags auditFlags,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAudit (AuditFlags auditFlags,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditSpecific (AuditFlags auditFlags,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditSpecific (AuditFlags auditFlags,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAudit (AuditFlags auditFlags,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAudit (AuditFlags auditFlags,
+ SecurityIdentifier sid,
+ int accessMask,
+ InheritanceFlags inheritanceFlags,
+ PropagationFlags propagationFlags,
+ ObjectAceFlags objectFlags,
+ Guid objectType,
+ Guid inheritedObjectType)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources
index bb0a5e9ebf6..89a63db851f 100644
--- a/mcs/class/corlib/corlib.dll.sources
+++ b/mcs/class/corlib/corlib.dll.sources
@@ -1045,16 +1045,69 @@ System.Security/UnverifiableCodeAttribute.cs
System.Security/VerificationException.cs
System.Security/XmlSyntaxException.cs
System.Security.AccessControl/AccessControlActions.cs
+System.Security.AccessControl/AccessControlModification.cs
System.Security.AccessControl/AccessControlSections.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/CommonObjectSecurity.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/CryptoKeySecurity.cs
+System.Security.AccessControl/CustomAce.cs
+System.Security.AccessControl/DirectoryObjectSecurity.cs
System.Security.AccessControl/DirectorySecurity.cs
+System.Security.AccessControl/DiscretionaryAcl.cs
+System.Security.AccessControl/EventWaitHandleAccessRule.cs
+System.Security.AccessControl/EventWaitHandleAuditRule.cs
System.Security.AccessControl/EventWaitHandleRights.cs
System.Security.AccessControl/EventWaitHandleSecurity.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/MutexRights.cs
System.Security.AccessControl/MutexSecurity.cs
System.Security.AccessControl/NativeObjectSecurity.cs
+System.Security.AccessControl/ObjectAccessRule.cs
+System.Security.AccessControl/ObjectAce.cs
+System.Security.AccessControl/ObjectAceFlags.cs
+System.Security.AccessControl/ObjectAuditRule.cs
System.Security.AccessControl/ObjectSecurity.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
System.Security.Cryptography/AsymmetricAlgorithm.cs
System.Security.Cryptography/AsymmetricKeyExchangeDeformatter.cs
System.Security.Cryptography/AsymmetricKeyExchangeFormatter.cs