[Mono-dev] Status of CodeAccessSecurity (CAS)?

Sebastien Pouliot sebastien.pouliot at gmail.com
Wed Nov 14 11:39:24 EST 2007


Hello David,

On Wed, 2007-11-14 at 11:24 -0500, David Wolinsky wrote:
> In mono version r88278 ... this code crashes really bad.... (see 
> below).  

CAS [1] support is experimental and unsupported. This is unlikely to
change in the near future (but contributions are still welcome) as we
will concentrate our security efforts to support the security model used
by Silverlight.

[1] http://www.mono-project.com/CAS

> I just wanted to know if anyone was actively working on this?  

No (afaik). CAS has been basically untouched for about 2 years now.

> Also is anyone working on the FileIOPermission?

same

> Regards,
> David
> 
> using System;
> using System.Net;
> using System.Net.Sockets;
> using System.Text;
> using System.Security;
> using System.Security.Permissions;
> 
> public class Test {
>   public static void Main() {
>     SocketPermission sp = new SocketPermission(PermissionState.None);
>     sp.Demand();
>     sp.Deny();
>     ST();
>   }
> 
>   public static void ST() {
>     string server = "www.google.com";
>     int port = 80;
>     Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, 
> ProtocolType.Tcp);
>     s.Connect(server, port);
>     string request = "GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n";
>     byte[] bs = Encoding.ASCII.GetBytes(request);
>     s.Send(bs, bs.Length, 0);
>     string page = String.Empty;
>     byte[] br = new byte[256];
>     int bytes = 0;
>     do {
>       bytes = s.Receive(br, br.Length, 0);
>       page += Encoding.ASCII.GetString(br, 0, bytes);
>     } while (bytes > 0);
>     Console.WriteLine(page);
>   }
> }
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list