<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a href="http://www.sandboxie.com/?StartCommandLine">http://www.sandboxie.com/?StartCommandLine</a> – it might need some communication trickery to get the output back. However,
I’d slightly got the wrong end of the stick: I thought the aim was sandboxing the opam-repository test builds, rather than all client builds!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">For ‘advanced’ tricks like LD_PRELOAD, OPAM needs to remember the MSVC (i.e. non-GNU) ports – I am reasonably certain that the Microsoft Linker has no equivalent to LD_PRELOAD.
The general Windows mechanism is code/DLL injection (which is part of how Sandboxie works)…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">David<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> rdicosmo@gmail.com [mailto:rdicosmo@gmail.com]
<b>On Behalf Of </b>Roberto Di Cosmo<br>
<b>Sent:</b> 24 February 2015 07:37<br>
<b>To:</b> David Allsopp<br>
<b>Cc:</b> opam-devel@lists.ocaml.org; Louis Gesbert<br>
<b>Subject:</b> Re: [opam-devel] OPAM 1.3 roadmap<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks David, this seems quite a useful app for people on Windows, but I did not find out whether it can be used as a console command: the documentation seems to imply that one needs to run its GUI, which is not gonna work for Opam...<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Maybe also on Windows we should stick to LD_PRELOAD, but I never tried that in practice... I wonder whether it will work with the cygwin/mingw toolchain.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2015-02-23 10:09 GMT+01:00 David Allsopp <<a href="mailto:david.allsopp@metastack.com" target="_blank">david.allsopp@metastack.com</a>>:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Roberto Di Cosmo wrote:<br>
> On Mon, Feb 23, 2015 at 10:07:58AM +0900, Louis Gesbert wrote:<br>
> > That's starting to sound fairly consistent:<br>
> ><br>
> > # Secure OPAM itself a bit:<br>
> ><br>
> > * Sandbox the build step: not sure how to do it, but it should be<br>
> without network access, and only allowed to write to its build dir.<br>
><br>
> This is really *not easy* in the current state of affairs<br>
><br>
> -> opam calls whatever command is declared in the build:/install: fields<br>
><br>
> -> this command can do whatever it wants; a sloppy Makefile might very<br>
> well end<br>
> up removing all the user-writeable files on a machine; think of<br>
> something like<br>
><br>
> PREFIX=$(HOME)/$(MYNICELOCALVAR) # ooops ... using a var defined<br>
> only on the dev machine!<br>
><br>
> install:<br>
> rm -rf $(PREFIX) # clean up dest dir on the dev machine; rm -rf<br>
> $(HOME) everywhere else!<br>
> ....<br>
> -> it's easy to pass through the integration test on opam-repository too:<br>
> if<br>
> somebody really wants to make bad jokes, one can simply check the<br>
> environment to be nice when going through Travis, and wreak havoc<br>
> elsewhere<br>
><br>
> In the GNU/Linux distribution world, we face a similar challenge, with<br>
> install scripts being on top run as root; the very stringent QA process<br>
> enforced by these communities mitigates the problem quite a bit, of<br>
> course, but it is still there and s*it happens.<br>
><br>
> That's why I was asking for the characteristics of the sandboxing<br>
> techniques we known. As with security, "sandbox" is a term easy to use,<br>
> but difficult to achieve.<br>
><br>
> My best bet is _really_ the ptrace approach followed by Mcqueen in<br>
> <a href="http://robot101.net/files/trace.tar.gz" target="_blank">http://robot101.net/files/trace.tar.gz</a> as it allows to monitor _all_ file<br>
> access even by statically linked binaries, and is able to make a backup<br>
> copy of modified files (to restore them, if something goes wrong).<br>
><br>
> What I do not know is whether something similar is available for *BSD, and<br>
> even less for Windows.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">See <a href="http://www.sandboxie.com/" target="_blank">http://www.sandboxie.com/</a> for Windows.<br>
<span style="color:#888888"><br>
<br>
<span class="hoenzb">David</span></span><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Roberto Di Cosmo<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">------------------------------------------------------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Professeur En delegation a l'INRIA<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">PPS E-mail: <a href="mailto:roberto@dicosmo.org" target="_blank">
roberto@dicosmo.org</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Universite Paris Diderot WWW : <a href="http://www.dicosmo.org" target="_blank">
http://www.dicosmo.org</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Case 7014 Tel : ++33-(0)1-57 27 92 20<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">5, Rue Thomas Mann <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">F-75205 Paris Cedex 13 Identica: <a href="http://identi.ca/rdicosmo" target="_blank">
http://identi.ca/rdicosmo</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">FRANCE. Twitter: <a href="http://twitter.com/rdicosmo" target="_blank">
http://twitter.com/rdicosmo</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">------------------------------------------------------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Attachments:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">MIME accepted, Word deprecated<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <a href="http://www.gnu.org/philosophy/no-word-attachments.html" target="_blank">
http://www.gnu.org/philosophy/no-word-attachments.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">------------------------------------------------------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Office location:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Bureau 320 (3rd floor)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Batiment Sophie Germain<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Avenue de France<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Metro Bibliotheque Francois Mitterrand, ligne 14/RER C<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-----------------------------------------------------------------<o:p></o:p></p>
</div>
<p class="MsoNormal">GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>