X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Security.AccessControl%2FCustomAce.cs;h=46c17e39f40e833458e455962d2f99864eeb9954;hb=f99366e0c3b81401c912c23eb29549dcf9ed7e8e;hp=5daecf72a97b63072b385e46a1d027794bfa30f8;hpb=4eb352bcb3ef7a71dc9ab62c5cd2d5e7598619f7;p=mono.git diff --git a/mcs/class/corlib/System.Security.AccessControl/CustomAce.cs b/mcs/class/corlib/System.Security.AccessControl/CustomAce.cs index 5daecf72a97..46c17e39f40 100644 --- a/mcs/class/corlib/System.Security.AccessControl/CustomAce.cs +++ b/mcs/class/corlib/System.Security.AccessControl/CustomAce.cs @@ -1,10 +1,11 @@ // // System.Security.AccessControl.CustomAce implementation // -// Author: +// Authors: // Dick Porter +// Atsushi Enomoto // -// Copyright (C) 2006 Novell, Inc (http://www.novell.com) +// Copyright (C) 2006-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 @@ -26,57 +27,58 @@ // 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 sealed class CustomAce : GenericAce { + private byte[] opaque; + public CustomAce (AceType type, AceFlags flags, byte[] opaque) + : base(type, flags) { - if (type <= AceType.MaxDefinedAceType) { - throw new ArgumentOutOfRangeException ("type"); - } /* FIXME: check length of opaque > * MaxOpaqueLength or !multiple of 4 - */ - //AceType = type; - //AceFlags = flags; + */ + SetOpaque (opaque); } - + + [MonoTODO] public static readonly int MaxOpaqueLength; - - public override int BinaryLength - { + + [MonoTODO] + public override int BinaryLength { get { throw new NotImplementedException (); } } - - public int OpaqueLength - { - get { - throw new NotImplementedException (); - } + + public int OpaqueLength { + get { return opaque.Length; } } - + + [MonoTODO] public override void GetBinaryForm (byte[] binaryForm, - int offset) + int offset) { throw new NotImplementedException (); } - + public byte[] GetOpaque () { - throw new NotImplementedException (); + return (byte[])opaque.Clone (); } - + public void SetOpaque (byte[] opaque) { - throw new NotImplementedException (); + if (opaque == null) + this.opaque = null; + else + this.opaque = (byte[])opaque.Clone (); } - } -} -#endif + internal override string GetSddlForm () + { + throw new NotSupportedException (); + } + } +} \ No newline at end of file