<div dir="ltr">I think it's mostly writing to files that is dangerous but disabling reading would be important too, if not only for forbidding "breaking" the fantasy console barriers. I looked at doing some changes but I was really not sure how to do it properly. If you would be generous enough to do the needed changes, it would be really amazing!<div><br></div><div>Thank you so much for your help!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 3, 2023 at 8:32 AM <<a href="mailto:bil@ccrma.stanford.edu">bil@ccrma.stanford.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Do you need to disallow reading a file? If it's just<br>
creating or altering a file that needs to be blocked,<br>
you could redirect fopen and fwrite (in s7.c) to<br>
functions that raise an error. I don't think s7 uses<br>
creat, open (except with O_RDONLY), or write. Also<br>
build it with WITH_C_LOADER=0 (to disallow dynamic<br>
loading of C object code), and maybe WITH_SYSTEM_EXTRAS=0.<br>
Hmmm... as I type this, this seems interesting --<br>
maybe I'll tackle it later today. It might be<br>
equally easy to disallow reading a file -- fread etc.<br>
Oh, and for fopen, check the mode doesn't have "w" or "x"<br>
or whatever else might change a file. I'm probably<br>
forgetting something obvious.<br>
<br>
(There's also the sandbox procedure in stuff.scm, but<br>
it's been years since I looked at it).<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">David</div>