2 // System.Security.AccessControl.ObjectSecurity implementation
5 // Dick Porter <dick@ximian.com>
7 // Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.Security.Principal;
32 using System.Runtime.InteropServices;
34 namespace System.Security.AccessControl {
36 public abstract class ObjectSecurity {
38 internal ObjectSecurity ()
40 /* Give it a 0-param constructor */
43 protected ObjectSecurity (bool isContainer, bool isDS)
47 public abstract Type AccessRightType
52 public abstract Type AccessRuleType
57 public bool AreAccessRulesCanonical
60 throw new NotImplementedException ();
64 public bool AreAccessRulesProtected
67 throw new NotImplementedException ();
71 public bool AreAuditRulesCanonical
74 throw new NotImplementedException ();
78 public bool AreAuditRulesProtected
81 throw new NotImplementedException ();
85 public abstract Type AuditRuleType
90 protected bool AccessRulesModified
93 throw new NotImplementedException ();
96 throw new NotImplementedException ();
100 protected bool AuditRulesModified
103 throw new NotImplementedException ();
106 throw new NotImplementedException ();
110 protected bool GroupModified
113 throw new NotImplementedException ();
116 throw new NotImplementedException ();
120 protected bool IsContainer
123 throw new NotImplementedException ();
130 throw new NotImplementedException ();
134 protected bool OwnerModified
137 throw new NotImplementedException ();
140 throw new NotImplementedException ();
144 public abstract AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type);
146 public abstract AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags);
148 public IdentityReference GetGroup (Type targetType)
150 throw new NotImplementedException ();
153 public IdentityReference GetOwner (Type targetType)
155 throw new NotImplementedException ();
158 public byte[] GetSecurityDescriptorBinaryForm ()
160 throw new NotImplementedException ();
163 public string GetSecurityDescriptorSddlForm (AccessControlSections includeSections)
165 throw new NotImplementedException ();
168 public static bool IsSddlConversionSupported ()
170 throw new NotImplementedException ();
173 public virtual bool ModifyAccessRule (AccessControlModification modification, AccessRule rule, out bool modified)
175 throw new NotImplementedException ();
178 public virtual bool ModifyAuditRule (AccessControlModification modification, AuditRule rule, out bool modified)
180 throw new NotImplementedException ();
183 public virtual void PurgeAccessRules (IdentityReference identity)
185 throw new NotImplementedException ();
188 public virtual void PurgeAuditRules (IdentityReference identity)
190 throw new NotImplementedException ();
193 public void SetAccessRuleProtection (bool isProtected,
194 bool preserveInheritance)
196 throw new NotImplementedException ();
199 public void SetAuditRuleProtection (bool isProtected,
200 bool preserveInheritance)
202 throw new NotImplementedException ();
205 public void SetGroup (IdentityReference identity)
207 throw new NotImplementedException ();
210 public void SetOwner (IdentityReference identity)
212 throw new NotImplementedException ();
215 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm)
217 throw new NotImplementedException ();
220 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm, AccessControlSections includeSections)
222 throw new NotImplementedException ();
225 public void SetSecurityDescriptorSddlForm (string sddlForm)
227 throw new NotImplementedException ();
230 public void SetSecurityDescriptorSddlForm (string sddlForm, AccessControlSections includeSections)
232 throw new NotImplementedException ();
235 protected abstract bool ModifyAccess (AccessControlModification modification, AccessRule rule, out bool modified);
237 protected abstract bool ModifyAudit (AccessControlModification modification, AuditRule rule, out bool modified);
239 protected virtual void Persist (SafeHandle handle, AccessControlSections includeSections)
241 throw new NotImplementedException ();
244 protected virtual void Persist (string name, AccessControlSections includeSections)
246 throw new NotImplementedException ();
249 protected virtual void Persist (bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
251 throw new NotImplementedException ();
254 protected void ReadLock ()
256 throw new NotImplementedException ();
259 protected void ReadUnlock ()
261 throw new NotImplementedException ();
264 protected void WriteLock ()
266 throw new NotImplementedException ();
269 protected void WriteUnlock ()
271 throw new NotImplementedException ();