//
// System.Security.AccessControl.CustomAce implementation
//
-// Author:
+// Authors:
// Dick Porter <dick@ximian.com>
+// Atsushi Enomoto <atsushi@ximian.com>
//
-// 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
// 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