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 {
35 public abstract class ObjectSecurity {
36 protected ObjectSecurity ()
38 /* Give it a 0-param constructor */
41 protected ObjectSecurity (bool isContainer, bool isDS)
45 public abstract Type AccessRightType
50 public abstract Type AccessRuleType
55 public bool AreAccessRulesCanonical
58 throw new NotImplementedException ();
62 public bool AreAccessRulesProtected
65 throw new NotImplementedException ();
69 public bool AreAuditRulesCanonical
72 throw new NotImplementedException ();
76 public bool AreAuditRulesProtected
79 throw new NotImplementedException ();
83 public abstract Type AuditRuleType
88 protected bool AccessRulesModified
91 throw new NotImplementedException ();
94 throw new NotImplementedException ();
98 protected bool AuditRulesModified
101 throw new NotImplementedException ();
104 throw new NotImplementedException ();
108 protected bool GroupModified
111 throw new NotImplementedException ();
114 throw new NotImplementedException ();
118 protected bool IsContainer
121 throw new NotImplementedException ();
128 throw new NotImplementedException ();
132 protected bool OwnerModified
135 throw new NotImplementedException ();
138 throw new NotImplementedException ();
142 public abstract AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type);
144 public abstract AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags);
146 public IdentityReference GetGroup (Type targetType)
148 throw new NotImplementedException ();
151 public IdentityReference GetOwner (Type targetType)
153 throw new NotImplementedException ();
156 public byte[] GetSecurityDescriptorBinaryForm ()
158 throw new NotImplementedException ();
161 public string GetSecurityDescriptorSddlForm (AccessControlSections includeSections)
163 throw new NotImplementedException ();
166 public static bool IsSddlConversionSupported ()
168 throw new NotImplementedException ();
171 public virtual bool ModifyAccessRule (AccessControlModification modification, AccessRule rule, out bool modified)
173 throw new NotImplementedException ();
176 public virtual bool ModifyAuditRule (AccessControlModification modification, AuditRule rule, out bool modified)
178 throw new NotImplementedException ();
181 public virtual void PurgeAccessRules (IdentityReference identity)
183 throw new NotImplementedException ();
186 public virtual void PurgeAuditRules (IdentityReference identity)
188 throw new NotImplementedException ();
191 public void SetAccessRuleProtection (bool isProtected,
192 bool preserveInheritance)
194 throw new NotImplementedException ();
197 public void SetAuditRuleProtection (bool isProtected,
198 bool preserveInheritance)
200 throw new NotImplementedException ();
203 public void SetGroup (IdentityReference identity)
205 throw new NotImplementedException ();
208 public void SetOwner (IdentityReference identity)
210 throw new NotImplementedException ();
213 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm)
215 throw new NotImplementedException ();
218 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm, AccessControlSections includeSections)
220 throw new NotImplementedException ();
223 public void SetSecurityDescriptorSddlForm (string sddlForm)
225 throw new NotImplementedException ();
228 public void SetSecurityDescriptorSddlForm (string sddlForm, AccessControlSections includeSections)
230 throw new NotImplementedException ();
233 protected abstract bool ModifyAccess (AccessControlModification modification, AccessRule rule, out bool modified);
235 protected abstract bool ModifyAudit (AccessControlModification modification, AuditRule rule, out bool modified);
237 protected virtual void Persist (SafeHandle handle, AccessControlSections includeSections)
239 throw new NotImplementedException ();
242 protected virtual void Persist (string name, AccessControlSections includeSections)
244 throw new NotImplementedException ();
247 protected virtual void Persist (bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
249 throw new NotImplementedException ();
252 protected void ReadLock ()
254 throw new NotImplementedException ();
257 protected void ReadUnlock ()
259 throw new NotImplementedException ();
262 protected void WriteLock ()
264 throw new NotImplementedException ();
267 protected void WriteUnlock ()
269 throw new NotImplementedException ();