Commit Graph
20 Commits
Author SHA1 Message Date
Sebastien Pouliot f2c9a7f3c3 SecurityException.cs: Show Evidence correctly (it's a collection) but avoid showing the Hash evidence (it's way too big to be useful).
svn path=/trunk/mcs/; revision=59182
2006-04-07 15:45:53 +00:00
Sebastien Pouliot 16a79daec3 2005-06-22 Sebastien Pouliot <[email protected]>
* 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
2005-06-22 18:35:41 +00:00
Sebastien Pouliot 9f7380675a 2005-05-25 Sebastien Pouliot <[email protected]>
* 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
2005-05-25 16:44:13 +00:00
Sebastien Pouliot 3ed164a91a 2005-04-28 Sebastien Pouliot <[email protected]>
* 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
2005-04-28 12:09:31 +00:00
Sebastien Pouliot 6c6cf1a64f * SecurityException.cs: Added try/catch in GetObjectData because the PermissionState property is serialized only if both ControlEvidence and ControlPolicy are granted.
svn path=/trunk/mcs/; revision=42450
2005-03-31 21:43:29 +00:00
Sebastien Pouliot e6db9936b8 2005-03-24 Sebastien Pouliot <[email protected]>
* 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
2005-03-24 15:11:54 +00:00
Sebastien Pouliot 0dd3240137 2005-02-15 Sebastien Pouliot <[email protected]>
* SecurityException.cs: Show the method informations when displaying a
	SecurityException.
	* SecurityManager.cs: Reworked InheritanceDemand implementation. Added
	a new method to throw a SecurityException for an InheritanceDemand.


svn path=/trunk/mcs/; revision=40698
2005-02-15 13:31:19 +00:00
Sebastien Pouliot 556928c517 2005-02-10 Sebastien Pouliot <[email protected]>
* SecurityException.cs: Show more information when a SecurityException
	occurs to help debugging.
	* SecurityManager.cs: Reworked LinkDemand implementation. Supply more
	informations when throwing a SecurityException for LinkDemand.
	* PermissionSet.cs: Remove (now) unused code for LinkDemand.


svn path=/trunk/mcs/; revision=40392
2005-02-10 12:36:48 +00:00
Sebastien Pouliot b3bda2812f 2005-01-27 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs: Process Deny for empty PermissionSet (e.g.
	an unrestricted permission set must deny all permissions).
	* SecurityException.cs: Added missing HResult to NET_2_0 constructors.
	Added securiy permissions for GrantedSet, RefusedSet and 
	PermissionState properties (to avoid leaking policy informations). 
	Make sure that ToString() always works.
	* SecurityManager.cs: Remove outdated comments (now that the 
	declarative attributes are in place).


svn path=/trunk/mcs/; revision=39655
2005-01-27 17:54:57 +00:00
Sebastien Pouliot 2e00f333b7 2004-11-30 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs:
	* NamedPermissionSet.cs:
	* PermissionSet.cs:
	* SecurityElement.cs:
	* SecurityException.cs:
		Added ComVisible attributes to match 2.0 October Preview.
	* SecureString.cs: Added an internal method to get the unencrypted 
	string (required to use the string inside mscorlib).


svn path=/trunk/mcs/; revision=36870
2004-11-30 23:56:18 +00:00
Sebastien Pouliot f319a9bee5 2004-10-15 Sebastien Pouliot <[email protected]>
* SecurityException.cs: Provide more details when a security exception
	is raised (to help debugging).

svn path=/trunk/mcs/; revision=35041
2004-10-15 16:08:57 +00:00
Sebastien Pouliot 488ecc889f 2004-07-14 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs: Added CheckAssert, CheckDemand, CheckDeny,
	CheckPermitOnly, Equals and GetHashCode to NET_2_0 profile. Actualized
	TODOs. Removed duplicate license.
	* NamedPermissionSet.cs: Added Equals/GetHashCode to NET_2_0 profile.
	Removed duplicate license.
	* PermissionSet.cs: Added Equals/GetHashCode to NET_2_0 profile.
	Removed duplicate license.
	* SecurityElement.cs: Added Copy and FromString methods to NET_2_0
	profile. Removed duplicate license.
	* SecurityException.cs: Added new constructors and properties to
	NET_2_0 profile. Removed duplicate license.
	* SecurityManager.cs: Added GetZoneAndOrigin and ResolvePolicy to
	NET_2_0 profile. Removed duplicate license.
	* VerificationException.cs: Implements _Exception for NET_2_0 profile.
	Removed duplicate license.
	* XmlSyntaxException.cs: Implements _Exception for NET_2_0 profile.
	Removed duplicate license.

svn path=/trunk/mcs/; revision=31128
2004-07-14 12:06:25 +00:00
Gert Driesen 2acc2aed04 * XmlSyntaxException.cs: added missing serialization ctor
* SecurityException.cs: fixed typo

svn path=/trunk/mcs/; revision=29620
2004-06-15 17:52:25 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Sebastien Pouliot bcb408cc6c 2004-01-06 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs: Fixed Demand for custom permissions
	(permissions that do not implement, the internal, IBuiltInPermission).
	Ref. http://bugzilla.ximian.com/show_bug.cgi?id=52626
	* SecurityException.cs: Fixed ToString() which could, when no
	PermissionType where specified, throws a NullReferenceException.
	Ref. http://bugzilla.ximian.com/show_bug.cgi?id=52626

svn path=/trunk/mcs/; revision=21774
2004-01-07 04:15:39 +00:00
Sebastien Pouliot 860cead170 2004-01-02 Sebastien Pouliot <[email protected]>
* AllowPartiallyTrustedCallersAttribute.cs: Fixed AttributeUsage using
	1.2 documentation (AllowMultiple=false, Inherited=false)
	* NamedPermissionSet.cs: Changes to match unit tests.
	* PermissionSet.cs: Implemented Copy, Intersect, IsSubsetOf and Union
	methods. Corrected FromXml.
	* PolicyLevelType.cs: Added missing [Serializable].
	* SecurityElement.cs: Fixed constructor to match unit tests.
	* SecurityException.cs: Added support for GrantedSet and RefusedSet
	properties (since 1.1). Set HResult to 0x8013150A.
	* SecurityZone.cs: Added missing [Serializable].
	* SuppressUnmanagedCodeSecurityAttribute.cs: Fixed AttributeUsage using
	1.2 documentation (AllowMultiple=true, Inherited=false)
	* UnverifiableCodeAttribute.cs: Fixed AttributeUsage using 1.2
	documentation (AllowMultiple=true, Inherited=false)

svn path=/trunk/mcs/; revision=21610
2004-01-03 00:56:33 +00:00
Piers Haken 610d7923ac added missing [Serializable] attribute
svn path=/trunk/mcs/; revision=3540
2002-04-01 20:22:40 +00:00
Duncan Mak dda793d7ae 2002-03-12 Duncan Mak <[email protected]>
* EndOfStreamException.cs:
	* FileLoadException.cs:
	* FileNotFoundException.cs:
	* PathTooLongException.cs: Changed the base classes to IOException
	instead of SystemException.

	* IOException.cs: Added missing constructors.

	* MissingManifestResourceException.cs: This should inherit from
	SystemException, not Exception.

	* SiteIdentityPermissionAttribute.cs:
	* UIPermissionAttribute.cs: These should inherit from
	CodeAccessSecurityAttribute, not IsolatedStoragePermissionAttribute.

	* SecurityException.cs: Inherit from SystemException, not Exception.

	* FieldAccessException.cs:
	* MethodAccessException.cs:
	* PlatformNotSupportedException.cs: Inherit from
	MemberAccessException, not SystemException.

svn path=/trunk/mcs/; revision=3076
2002-03-12 19:25:34 +00:00
Duncan Mak 01beb5e5b9 Serialization bits for System.Collection.Hashtable, System.Reflection.AssemblyName and System.Security.SecurityException
svn path=/trunk/mcs/; revision=2259
2002-02-07 17:33:39 +00:00
Nick Drochak ba7879b5a9 2001-12-29 Nick Drochak <[email protected]>
* ISecurityPolicyEncodable.cs, PolicyLevelType.cs,
	SecurityZone.cs, SecurityException.cs, UnverifiableCodeAttribute.cs,
	SuppressUnmanagedCodeSecurityAttribute.cs,
	VerificationException.cs, XmlSyntaxException.cs: New files

svn path=/trunk/mcs/; revision=1749
2001-12-29 12:07:33 +00:00