[Mono-list] Mono Enable CoreCLR

sunwukong wicked.wukong at gmail.com
Mon Mar 25 14:49:45 UTC 2013

Hi,I am building a sandbox with Mono which will be used to run untrusted code
uploaded to the site. I wanna enable coreCLR security for this and limit the
number of things which a user can do in his/her code. Here is my code
verifying custom BCL. I have a custom assembly list towards which I verify
and return false if the assembly is not in the list. The problem seems that
even if I return false for one of the assemblies the execution moves forward
and never throws a security exception as expected :).  This function is
registered as callback and I can see the call getting into this function and
it returning a FALSE for one of the assemblies verified but mono doesn't
seem to fail and moves to next assembly where it passes and returns TRUE
again. Am I missing something in the way it is implemented?Thank youstatic
gbooleandetermine_platform_image(const char *image_name) {  gchar *dir,
*name;  unsigned int i;  if (!image_name)    return FALSE;  dir =
g_path_get_dirname (image_name);  if (!dir) {    g_free (dir);    return
FALSE;  }  name = g_path_get_basename (image_name);  g_free (dir);  for (i =
0; i < G_N_ELEMENTS (platform_code_assemblies); i++) {    if
(g_ascii_strcasecmp (name, platform_code_assemblies [i]) == 0) {      g_free
(name);      return TRUE;    }  }  g_free (name);  return FALSE;}

Mobilis in Mobili...
View this message in context: http://mono.1490590.n4.nabble.com/Mono-Enable-CoreCLR-tp4659145.html
Sent from the Mono - General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130325/ec975b19/attachment.html>

More information about the Mono-list mailing list