* SecurityElement.cs :
set_Text() should unescape the input string. get_Text() should
return unescaped string. It also applies to attribute value.
ToString() should return valid (escaped) XML.
* SecurityElementTest.cs : enabled test for #333699 and added
couple more.
svn path=/trunk/mcs/; revision=89135
ensure exception message match that of MS. In Tag property, set name
of parameter in ArgumentNullException and do not filter out
namespace prefixes. Modified Text property to allow null values
after change to IsValidText that no longer considers null value as
valid. Avoid NRE in Escape.
* SecurityElementTest.cs: No longer derive from Assertion. Added and
improved ctor tests. Improved AddAttribute and AddChild tests.
Added comment to mono's Attributes test and added test that passes
on MS (to track fix for MS bug). Improved IsValid* tests. Added tests
for Tag and Text. Improved FromString test to verify behavior wrt
namespace prefixes. Added test for bug #333699.
svn path=/trunk/mcs/; revision=87459
* SecurityManager.cs: Changed method argument of
LinkDemandSecurityException to IntPtr and removed the assembly
argument (which can be gotten to via the method), to avoid having
to embed reference object values in the native code.
svn path=/trunk/mcs/; revision=84932
* SecurityManager.cs: Changed arguments of MethodAccessException
to IntPtr, to avoid having to embed reference object values in the
native code.
svn path=/trunk/mcs/; revision=84456
* SecurityContext.cs: Don't call CompressedStack.Run if we don't have
a compressed stack in the context (which can now happen because of
#78652). This should fix MWF bug #78652 (BeginInvoke under 2.0).
svn path=/trunk/mcs/; revision=61755
* SecureString.cs: Completed InsertAt, fixed Alloc not to re-alloc a
block of the same size. Fixed missing encryption for the char* ctor.
Only missing is access to ProtectedMemory do to the [en|de]cryption.
svn path=/trunk/mcs/; revision=52910
* SecureString.cs: Changed the previous (and partial) managed
implementation to one (that will be) based on ProtectedMemory. Work in
progress...
svn path=/trunk/mcs/; revision=52329
* PermissionSet.cs: If the current permission set is unrestricted then
we must allow "permit only" for unrestricted (all other case are known
to be too restrictive).
svn path=/trunk/mcs/; revision=51807
* SecurityManager.cs: Added [Obsolete] on SecurityEnabled for 2.0 (as
it cannot be turned off on MS runtime anymore). Removed dependecies
on PermissionSetCollection as this class (related to *Choice actions)
didn't make it to 2.0 RC.
svn path=/trunk/mcs/; revision=50498
* SecurityManager.cs: Added AppDomain support in InheritanceDemand.
Fixed some another small difference between 1.x and 2.0 (wrt
unrestricted permissions). Fixed error reporting for InheritanceDemand
(was LinkDemand).
svn path=/trunk/mcs/; revision=49347
* CodeAccessPermission.cs: Fix Deny for permissions that do not return
null for empty intersection (common on flags-based permissions).
* PermissionBuilder.cs: Add an helper call to create an empty
(PermissionState.None) permission from a type.
svn path=/trunk/mcs/; revision=49339
* CodeAccessPermission.cs: Fix Unrestricted PermitOnly (which is like
a no-op). Speed up Assert if Unrestricted.
* HostSecurityManager.cs: Updated FIXME description.
* PermissionSet.cs: Remove Copy() of the permission set when non-CAS
permissions are used (replaced by an array of bools). Completed Assert
support by re-using the array of bools. Updated TODO descriptions.
* SecurityException.cs: Added evidence (if available) in the ToString
description of the exception.
* SecurityManager.cs: Reworked CheckExecutionRights to get the correct
behavior.
svn path=/trunk/mcs/; revision=46378
* CodeAccessPermission.cs: Removed redundant and unrequired TODO.
* PermissionSet.cs: Some 2.0 optimizations (because sets are simpler
without the special case for identity permissions).
* SecurityManager.cs: Shortcut for ResolveIdentityPermissions (in 2.0)
and some more declarative security syntax updates.
svn path=/trunk/mcs/; revision=46249
IsSubsetOf method.
* SecurityManager.cs: Simplified IsGranted and added support for 2.0
(where all permissions support unrestricted). Changed desclarative
security syntax not to use flags (like the rest of the source code).
2005-06-16 Sebastien Pouliot <[email protected]>
svn path=/trunk/mcs/; revision=46102
* SecurityManager.cs: Added ResolvingPolicyLevel property to enable
support for FullTrustAssemblies during policy resolution. Reworked
(simplified) locking. Moved check for CheckExecutionRights to the
"right" place.
* PermissionSet.cs: Added shortcut in GetPermission(Type).
svn path=/trunk/mcs/; revision=45967
* PermissionBuilder.cs: Removed unification stuff. This is done at a
lower level.
* SecurityManager.cs: Split loading PolicyLevel in two phases. The
PolicyHierarchy is now available after phase 1 which ensures we can
load permission from outside corlib.
svn path=/trunk/mcs/; revision=45305
* CodeAccessPermission.cs: Allow unrestricted identity permissions in
2.0.
* PermissionBuilder.cs: New. Internal class to help create permission
instances from XML or with a fully qualified name. This class also
deals with unification.
* PermissionSet.cs: Use PermissionBuilder to create permissions in
FromXml method. Many 2.0 fixes (mostly to support unrestricted
identity permissions)
svn path=/trunk/mcs/; revision=45117
* CodeAccessPermission.cs: Fix typo for PermitOnly. Added ComVisible
attribute for NET_2_0 profile.
* PermissionSet.cs: Changed static string to const. Added ComVisible
attribute for NET_2_0 profile.
* SecurityContext.cs: Capture the identity token but don't create a
WindowsIdentity instance unless required (e.g. Run). This requires
less privileges (so it runs better that way under CAS).
svn path=/trunk/mcs/; revision=45039
* SecurityException.cs: PermissionState isn't always serialized
(depending on the security policy) so it cannot always be deserialized
too (and this must work without throwing exceptions).
svn path=/trunk/mcs/; revision=45006
* SecurityContext.cs: Includes more methods in NET_1_1 to enable
ThreadPool.UnsafeQueueUserWorkItem to work properly (i.e. without
stack propagation).
svn path=/trunk/mcs/; revision=44817
* PermissionSet.cs: Add support for "hidden" read-only mode (as used
by PolicyStatement).
* SecurityFrame.cs: Add some debugging code in the ToString method.
* SecurityManager.cs: Changed internal API so we can display the
permission that failed in a PermissionSet (e.g. assembly or appdomain).
svn path=/trunk/mcs/; revision=44585
* SecurityManager.cs: GetZoneAndOrigin is present in 1.1 too (but is
hidden from mono-api-info because of the LinkDemand for ECMA key).
svn path=/trunk/mcs/; revision=44390
* SecurityContext.cs: Capture the CompressedStack when the current
context one is empty.
* SecurityManager.cs: Class is now static (2.0).
* SecurityTreatAsSafeAttribute.cs: Fixed AttributeTargets.
svn path=/trunk/mcs/; revision=44265
* CodeAccessPermission.cs: Reworked frames check to check only for
the stack modifiers. Throwing a SecurityException now calls Assembly.
UnprotectedGetName () to avoid throwing (recursively) other
SecurityExceptions.
* PermissionSet.cs: Reworked frames check to include Assembly (moved)
and AppDomain (new) transitions.
* SecurityFrame.cs: Added Domain member to match the runtime structure
definition. Removed debugging code (will be moved into the runtime
later) as it can cause SecurityException is some cases.
* SecurityManager.cs: Added a method to check if a PermissionSet is
granted by an AppDomain.
svn path=/trunk/mcs/; revision=44124
* PermissionSetCollection.cs: Updated wrt beta2. Seems this will be
removed before 2.0 final.
* HostProtectionException.cs: Updated wrt beta2. Added TODO as it
isn't support by the runtime.
* SecurityContext.cs: Updated wrt beta2. Class is now internal in
NET_1_1 to allow the compressed stack propagation to other threads.
* SecurityCriticalAttribute.cs: Added support for property Scope.
* SecurityException.cs: Removed PermitOnlySetInstance property to
match beta2.
* SecurityTransparentAttribute.cs: Fixed AttributeUsage. Added TODO
as it isn't support by the runtime.
* SuppressUnmanagedCodeSecurityAttribute.cs: Added delegates to usage
in NET_2_0.
svn path=/trunk/mcs/; revision=43714
* CodeAccessPermission.cs: Fixed PermitOnly when used in a set. Added
an InheritanceDemand for ControlEvidence and ControlPolicy on the
class.
* PermissionSet.cs: Added an InheritanceDemand for MS public key on
class.
* SecurityException.cs: Moved PermissionType up in ToString as this
property isn't restricted (i.e. will be part of the output even if
the other properties can't make it).
svn path=/trunk/mcs/; revision=42219
* SecurityManager.cs: Fix CodeAccessPermissionTest.CustomCAS unit test
when --security is enabled (code was over-optimized ;-).
svn path=/trunk/mcs/; revision=41794