X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Security.AccessControl%2FCustomAce.cs;h=6cb3b61002189a0db565f5d6b46249fbd0efa362;hb=a5b3f56d50d09f37c6eaedc7e6971e3f63f7ac80;hp=5daecf72a97b63072b385e46a1d027794bfa30f8;hpb=0443306d611d0830e27327e1f0a3ef3457dfa535;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..6cb3b610021 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 @@ -30,51 +31,52 @@ using System.Collections; -namespace System.Security.AccessControl { +namespace System.Security.AccessControl +{ public sealed class CustomAce : GenericAce { - public CustomAce (AceType type, AceFlags flags, byte[] opaque) + public CustomAce (AceType type, AceFlags flags, byte [] opaque) + : base (type) { - if (type <= AceType.MaxDefinedAceType) { - throw new ArgumentOutOfRangeException ("type"); - } + AceFlags = flags; + /* FIXME: check length of opaque > * MaxOpaqueLength or !multiple of 4 */ - //AceType = type; - //AceFlags = flags; + SetOpaque (opaque); } - + + byte [] opaque; + + [MonoTODO] public static readonly int MaxOpaqueLength; - public override int BinaryLength - { - get { - throw new NotImplementedException (); - } + [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) { throw new NotImplementedException (); } - public byte[] GetOpaque () + public byte [] GetOpaque () { - throw new NotImplementedException (); + return (byte []) opaque.Clone (); } - public void SetOpaque (byte[] opaque) + public void SetOpaque (byte [] opaque) { - throw new NotImplementedException (); + if (opaque == null) + throw new ArgumentNullException ("opaque"); + this.opaque = (byte []) opaque.Clone (); } } }