| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
- //
- // System.Security.AccessControl.ObjectSecurity implementation
- //
- // Authors:
- // Dick Porter <[email protected]>
- // Atsushi Enomoto <[email protected]>
- //
- // Copyright (C) 2005-2007 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.
- //
- using System.Security.Principal;
- using System.Runtime.InteropServices;
- namespace System.Security.AccessControl
- {
- public abstract class ObjectSecurity
- {
- internal ObjectSecurity ()
- {
- /* Give it a 0-param constructor */
- }
-
- protected ObjectSecurity (bool isContainer, bool isDS)
- {
- is_container = isContainer;
- is_ds = isDS;
- }
- bool is_container, is_ds;
- bool access_rules_modified, audit_rules_modified;
- bool group_modified, owner_modified;
- public abstract Type AccessRightType { get; }
-
- public abstract Type AccessRuleType { get; }
-
- public abstract Type AuditRuleType { get; }
-
- [MonoTODO]
- public bool AreAccessRulesCanonical
- {
- get {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool AreAccessRulesProtected
- {
- get {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool AreAuditRulesCanonical
- {
- get {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool AreAuditRulesProtected
- {
- get {
- throw new NotImplementedException ();
- }
- }
-
- protected bool AccessRulesModified {
- get { return access_rules_modified; }
- set { access_rules_modified = value; }
- }
-
- protected bool AuditRulesModified {
- get { return audit_rules_modified; }
- set { audit_rules_modified = value; }
- }
-
- protected bool GroupModified {
- get { return group_modified; }
- set { group_modified = value; }
- }
-
- protected bool IsContainer {
- get { return is_container; }
- }
-
- protected bool IsDS {
- get { return is_ds; }
- }
-
- protected bool OwnerModified {
- get { return owner_modified; }
- set { owner_modified = value; }
- }
-
- 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);
-
- [MonoTODO]
- public IdentityReference GetGroup (Type targetType)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public IdentityReference GetOwner (Type targetType)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public byte[] GetSecurityDescriptorBinaryForm ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public string GetSecurityDescriptorSddlForm (AccessControlSections includeSections)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public static bool IsSddlConversionSupported ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public virtual bool ModifyAccessRule (AccessControlModification modification, AccessRule rule, out bool modified)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public virtual bool ModifyAuditRule (AccessControlModification modification, AuditRule rule, out bool modified)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public virtual void PurgeAccessRules (IdentityReference identity)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public virtual void PurgeAuditRules (IdentityReference identity)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetAccessRuleProtection (bool isProtected,
- bool preserveInheritance)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetAuditRuleProtection (bool isProtected,
- bool preserveInheritance)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetGroup (IdentityReference identity)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetOwner (IdentityReference identity)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetSecurityDescriptorBinaryForm (byte[] binaryForm)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetSecurityDescriptorBinaryForm (byte[] binaryForm, AccessControlSections includeSections)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SetSecurityDescriptorSddlForm (string sddlForm)
- {
- throw new NotImplementedException ();
- }
- [MonoTODO]
- 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);
-
- [MonoTODO]
- protected virtual void Persist (SafeHandle handle, AccessControlSections includeSections)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected virtual void Persist (string name, AccessControlSections includeSections)
- {
- throw new NotImplementedException ();
- }
- [MonoTODO]
- protected virtual void Persist (bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected void ReadLock ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected void ReadUnlock ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected void WriteLock ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected void WriteUnlock ()
- {
- throw new NotImplementedException ();
- }
- }
- }
|