Author: spouliot
Date: 2005-03-24 08:50:32 -0500 (Thu, 24 Mar 2005)
New Revision: 42209
Modified:
trunk/mcs/class/corlib/System.Threading/ChangeLog
trunk/mcs/class/corlib/System.Threading/CompressedStack.cs
trunk/mcs/class/corlib/System.Threading/Mutex.cs
trunk/mcs/class/corlib/System.Threading/Thread.cs
trunk/mcs/class/corlib/System.Threading/WaitHandle.cs
Log:
2005-03-24 Sebastien Pouliot <[EMAIL PROTECTED]>
* CompressedStack.cs: Added LinkDemand for UnmanagedCode and ECMA
public key on GetCompressedStack method.
* Mutex: Added LinkDemand for UnmanagedCode to create named (system
wide) mutexes.
* Thread.cs: Added LinkDemand for ECMA public key on [Get|Set]
CompressedStack methods.
* WaitHandle.cs: Added LinkDemand and InheritanceDemand for
UnmanagedCode on set Handle property.
Modified: trunk/mcs/class/corlib/System.Threading/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Threading/ChangeLog 2005-03-24 13:40:19 UTC
(rev 42208)
+++ trunk/mcs/class/corlib/System.Threading/ChangeLog 2005-03-24 13:50:32 UTC
(rev 42209)
@@ -1,3 +1,14 @@
+2005-03-24 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * CompressedStack.cs: Added LinkDemand for UnmanagedCode and ECMA
+ public key on GetCompressedStack method.
+ * Mutex: Added LinkDemand for UnmanagedCode to create named (system
+ wide) mutexes.
+ * Thread.cs: Added LinkDemand for ECMA public key on [Get|Set]
+ CompressedStack methods.
+ * WaitHandle.cs: Added LinkDemand and InheritanceDemand for
+ UnmanagedCode on set Handle property.
+
2005-03-10 Zoltan Varga <[EMAIL PROTECTED]>
* Thread.cs: Make slothash a ThreadStatic field. Fixes #65414.
Modified: trunk/mcs/class/corlib/System.Threading/CompressedStack.cs
===================================================================
--- trunk/mcs/class/corlib/System.Threading/CompressedStack.cs 2005-03-24
13:40:19 UTC (rev 42208)
+++ trunk/mcs/class/corlib/System.Threading/CompressedStack.cs 2005-03-24
13:50:32 UTC (rev 42209)
@@ -5,7 +5,7 @@
// Zoltan Varga ([EMAIL PROTECTED])
// Sebastien Pouliot <[EMAIL PROTECTED]>
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 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
@@ -33,6 +33,7 @@
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
+using System.Security.Permissions;
namespace System.Threading {
@@ -65,7 +66,7 @@
[ComVisibleAttribute (false)]
public CompressedStack CreateCopy ()
{
- // in 2.0 beta1 Object.ReferenceEquals (cs,
cs.CreateCopy ()) == true !!!
+ // FIXME: in 2.0 beta1 Object.ReferenceEquals (cs,
cs.CreateCopy ()) == true !!!
return this;
// return new CompressedStack (this);
}
@@ -84,6 +85,8 @@
return cs;
}
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode =
true)]
+ [StrongNameIdentityPermission (SecurityAction.LinkDemand,
PublicKey="00000000000000000400000000000000")]
static public CompressedStack GetCompressedStack ()
{
// Note: CompressedStack.GetCompressedStack doesn't
return null
Modified: trunk/mcs/class/corlib/System.Threading/Mutex.cs
===================================================================
--- trunk/mcs/class/corlib/System.Threading/Mutex.cs 2005-03-24 13:40:19 UTC
(rev 42208)
+++ trunk/mcs/class/corlib/System.Threading/Mutex.cs 2005-03-24 13:50:32 UTC
(rev 42209)
@@ -2,16 +2,12 @@
// System.Threading.Mutex.cs
//
// Author:
-//
// Dick Porter ([EMAIL PROTECTED])
// Veronica De Santis ([EMAIL PROTECTED])
//
// (C) Ximian, Inc. http://www.ximian.com
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
-
-//
-// Copyright (C) 2004 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
// "Software"), to deal in the Software without restriction, including
@@ -32,8 +28,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Runtime.CompilerServices;
+using System.Security.Permissions;
namespace System.Threading
{
@@ -61,18 +57,17 @@
out created);
}
- public Mutex(bool initiallyOwned, string name) {
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode =
true)]
+ public Mutex (bool initiallyOwned, string name)
+ {
bool created;
-
- Handle=CreateMutex_internal(initiallyOwned, name,
- out created);
+ Handle = CreateMutex_internal (initiallyOwned, name,
out created);
}
-
- public Mutex(bool initiallyOwned, string name,
- out bool createdNew) {
- Handle=CreateMutex_internal(initiallyOwned, name,
- out createdNew);
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode =
true)]
+ public Mutex (bool initiallyOwned, string name, out bool
createdNew)
+ {
+ Handle = CreateMutex_internal (initiallyOwned, name,
out createdNew);
}
public void ReleaseMutex() {
Modified: trunk/mcs/class/corlib/System.Threading/Thread.cs
===================================================================
--- trunk/mcs/class/corlib/System.Threading/Thread.cs 2005-03-24 13:40:19 UTC
(rev 42208)
+++ trunk/mcs/class/corlib/System.Threading/Thread.cs 2005-03-24 13:50:32 UTC
(rev 42209)
@@ -5,12 +5,8 @@
// Dick Porter ([EMAIL PROTECTED])
//
// (C) Ximian, Inc. http://www.ximian.com
-// Copyright (C) 2004 Novell (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
-
-//
-// Copyright (C) 2004 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
// "Software"), to deal in the Software without restriction, including
@@ -891,6 +887,8 @@
}
}
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode =
true)]
+ [StrongNameIdentityPermission (SecurityAction.LinkDemand,
PublicKey="00000000000000000400000000000000")]
public CompressedStack GetCompressedStack ()
{
// Note: returns null if no CompressedStack has been
set.
@@ -899,6 +897,8 @@
return _stack;
}
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode =
true)]
+ [StrongNameIdentityPermission (SecurityAction.LinkDemand,
PublicKey="00000000000000000400000000000000")]
public void SetCompressedStack (CompressedStack stack)
{
_stack = stack;
Modified: trunk/mcs/class/corlib/System.Threading/WaitHandle.cs
===================================================================
--- trunk/mcs/class/corlib/System.Threading/WaitHandle.cs 2005-03-24
13:40:19 UTC (rev 42208)
+++ trunk/mcs/class/corlib/System.Threading/WaitHandle.cs 2005-03-24
13:50:32 UTC (rev 42209)
@@ -6,11 +6,8 @@
// Gonzalo Paniagua Javier ([EMAIL PROTECTED]
//
// (C) 2002,2003 Ximian, Inc. (http://www.ximian.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
-
-//
-// Copyright (C) 2004 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
// "Software"), to deal in the Software without restriction, including
@@ -33,6 +30,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Remoting.Contexts;
+using System.Security.Permissions;
namespace System.Threading
{
@@ -152,6 +150,8 @@
return(os_handle);
}
+ [SecurityPermission (SecurityAction.LinkDemand,
UnmanagedCode = true)]
+ [SecurityPermission (SecurityAction.InheritanceDemand,
UnmanagedCode = true)]
set {
os_handle=value;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches