On 6/28/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
On 6/28/06, Jim Jewett <[EMAIL PROTECTED]> wrote:
> On 6/27/06, Neal Norwitz <[EMAIL PROTECTED]> wrote:
> > On 6/27/06, Brett Cannon < [EMAIL PROTECTED]> wrote:
> > >
> > > > (5)  I think file creation/writing should be capped rather than
> > > > binary; it is reasonable to say "You can create a single temp file up
> > > > to 4K" or "You can create files, but not more than 20Meg total".
>
> > > That has been suggested before.  Anyone else like this idea?
>
> > [ What exactly does the limit mean?  bytes written?  bytes currently stored?  bytes stored after exit?]
>
> IMHO, I would prefer that it limit disk consumption; a deleted or
> overwritten file would not count against the process, but even a
> temporary spike would need to be less than the cap.

Some additional notes:

- File size should be rounded up to some block size (512 if you don't
have filesystem specific information) before adding to the total.

Why?

- Total number of files (i.e. inodes) in existence should be capped, too.

If you want that kind of cap, just specify individual files you are willing to let people open for reading; that is your cap.  Only have to worry about this if you open an entire directory open for writing.

- If sandboxed code is allowed to create dierctories, the total depth
and the total path length should also be capped.

Once again, another one of those balance issues of where do we draw the line in terms of simplicity in the setting compared to controlling every possible setting people will want (especially, it seems, when it comes to writing to disk).  And if you want to allow directory writing, you need to allow use of the platform's OS-specific module ( e.g., posix) to do it since open() won't let you create a directory.

I really want to keep the settings and setup simple.  I don't want to overburden people with a ton of security settings.

(I find reading about trusted and untrusted code confusing; a few
times I've had to read a sentence three times before realizing I had
swapped those two words. Perhaps we can distinguish between trusted
and sandboxed? Or even native and sandboxed?)




Fair enough.  When I do the next draft I will make them more distinctive (probably "trusted" and "sandboxed").

-Brett
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to