12-27-06 06:16 PM
In article <slrnep5bbi.2rv.cheney@atc5.vermine.org>,
Andre Majorel <cheney@halliburton.com> wrote:
> On 2006-12-27, Stefaan A Eeckels <hoendech@ecc.lu> wrote:
>
> ulimit can certainly prevent a process from writing to files.
>
>
> Yes. A mechanism to prevent open(O_RDWR/O_WRONLY) to fail if the
> pathname is not kosher would be good enough for me.
>
>
> Is there is a way to prevent a process from consuming any disk
> space outside of a chosen directory or filesystem ? The process
> does not cooperate (suppose no access to the source code) but is
> not actively hostile either. I'm not trying to guard against
> attacks, only bugs and operator errors.
>
> chroot is too much work to set up and maintain. Playing with
> permissions won't work for several reasons, one of them being
> that some of the processes need to run as root. Running the
> process inside a virtual machine and preloading open(2) are of
> course possibilities but the point is, if there's a standard
> facility for that (E.G. something like ulimit), I'd like to
> learn about it.
if chroot doesn't work for you "because it's to much work", I suggest
you look at the sources for your OS and put changes in the open() call
to implement the limits you're looking for. AFAIK, most UNIX system
can' do this (unless there's some NSA-variant which if I told you about
I'd have to kill you).
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[ Post a follow-up to this message ]
|