From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id B7C27BC48 for ; Sun, 20 Mar 2005 23:19:16 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2KMJG60015103 for ; Sun, 20 Mar 2005 23:19:16 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA04203 for ; Sun, 20 Mar 2005 23:19:16 +0100 (MET) Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2KMJFQL011265 for ; Sun, 20 Mar 2005 23:19:15 +0100 Received: from fwd31.aul.t-online.de by mailout04.sul.t-online.com with smtp id 1DD8lP-00020R-01; Sun, 20 Mar 2005 23:19:15 +0100 Received: from [80.133.125.108] (rAeRNeZVQeCE3n8ZNOf376ZWNbUrUBOTg1yFAOXSRJ2VkrClS0fGQ8@[80.133.125.108]) by fwd31.sul.t-online.de with esmtp id 1DD8lE-1ZsJHs0; Sun, 20 Mar 2005 23:19:04 +0100 Message-ID: <423DF6DA.3090800@t-online.de> Date: Sun, 20 Mar 2005 23:19:06 +0100 From: Christian Szegedy User-Agent: Mozilla Thunderbird 1.0 (X11/20050131) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Sandboxing in ocaml References: <423CB1BB.5080906@t-online.de> <20050320.085649.30145338.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20050320.085649.30145338.garrigue@math.nagoya-u.ac.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: rAeRNeZVQeCE3n8ZNOf376ZWNbUrUBOTg1yFAOXSRJ2VkrClS0fGQ8 X-TOI-MSGID: 6450b03a-b549-43cc-821c-c3fb8d913706 X-Miltered: at nez-perce with ID 423DF6E4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 423DF6E3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 subset:01 pervasives:01 dynlink:01 pervasives:01 wrote:01 dynamically:01 compile:01 functions:01 functions:01 jacques:01 mmm:02 unit:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Jacques Garrigue wrote: >>Is this possible in ocaml to dynamically load some (bytcode) OCaml file >>and run it in a safe environment, that is only using a small subset of >>selected functions instead of the whole Pervasives? >> >> > >This is the intent of Dynlink.allow_only. >Not however that allowing is done on a unit base, so if you want to >allow only some functions in a unit, you must create a new one >containing only those, and compile your file against those (otherwise you >won't be able to load it). >This is the way MMM applets are made safe. > > Excellent! This sounds exactly what I want. Can I forbid the Pervasives unit while linking the applet? Thanks a lot, Christian