Author: spouliot
Date: 2005-03-31 16:43:29 -0500 (Thu, 31 Mar 2005)
New Revision: 42450

Modified:
   trunk/mcs/class/corlib/System.Security/ChangeLog
   trunk/mcs/class/corlib/System.Security/SecurityException.cs
Log:
* SecurityException.cs: Added try/catch in GetObjectData because the 
PermissionState property is serialized only if both ControlEvidence and 
ControlPolicy are granted.

Modified: trunk/mcs/class/corlib/System.Security/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Security/ChangeLog    2005-03-31 21:39:52 UTC 
(rev 42449)
+++ trunk/mcs/class/corlib/System.Security/ChangeLog    2005-03-31 21:43:29 UTC 
(rev 42450)
@@ -1,3 +1,9 @@
+2005-03-31  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * SecurityException.cs: Added try/catch in GetObjectData because the
+       PermissionState property is serialized only if both ControlEvidence 
+       and ControlPolicy are granted.
+
 2005-03-24  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * CodeAccessPermission.cs: Fixed PermitOnly when used in a set. Added

Modified: trunk/mcs/class/corlib/System.Security/SecurityException.cs
===================================================================
--- trunk/mcs/class/corlib/System.Security/SecurityException.cs 2005-03-31 
21:39:52 UTC (rev 42449)
+++ trunk/mcs/class/corlib/System.Security/SecurityException.cs 2005-03-31 
21:43:29 UTC (rev 42450)
@@ -266,7 +266,12 @@
                public override void GetObjectData (SerializationInfo info, 
StreamingContext context)
                {
                        base.GetObjectData (info, context);
-                       info.AddValue ("PermissionState", permissionState);
+                       try {
+                               info.AddValue ("PermissionState", 
PermissionState);
+                       }
+                       catch (SecurityException) {
+                               // serialize only if permitted to do so
+                       }
                }
 
                public override string ToString ()

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to