Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2009 14:24:23 +0100
From:      Tom Evans <tevans.uk@googlemail.com>
To:        Menshikov Konstantin <kostjn@peterhost.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Disk quota for Jail. Discussion.
Message-ID:  <1243344263.9871.2.camel@strangepork.london.mintel.ad>
In-Reply-To: <4A1BE827.2030303@peterhost.ru>
References:  <4A1B8CF8.7030102@peterhost.ru> <20090526120313.GA1927@deviant.kiev.zoral.com.ua> <4A1BE1F8.9050804@peterhost.ru> <20090526123632.GB1927@deviant.kiev.zoral.com.ua> <4A1BE827.2030303@peterhost.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2009-05-26 at 17:01 +0400, Menshikov Konstantin wrote:
> Kostik Belousov wrote:
> > On Tue, May 26, 2009 at 04:35:04PM +0400, Menshikov Konstantin wrote:
> >   
> >> Kostik Belousov wrote:
> >>     
> >>> On Tue, May 26, 2009 at 10:32:24AM +0400, Menshikov Konstantin wrote:
> >>>       
> >>>> In structure prison it is added structures containing disk quotas and 
> >>>> usage.
> >>>> At start Jail, we calculate the size root path and number of files in 
> >>>> it, thus receiving current use of a disk.
> >>>> In functions of allocation of disk blocks and inode, we check quotas and 
> >>>> we increase current use.
> >>>>    
> >>>>         
> >>> UFS cannot determine whether the new allocation goes under the jail
> >>> root or not.
> >>>  
> >>>       
> >> Yes. But jail cannot allocate block and inode above root path. In 
> >> allocation functions, whether for example ffs_alloc we have access to 
> >> ucred process and we can check up there is a process in jail.
> >>     
> >
> > Yes, you can check this for jailed process. Think about non-jailed processes
> > that can do allocation below the jail root.
> >   
> Processes out of jail are not considered.
> I do not understand, these processes have what relation to disk to 
> quotas for jail. Please explain more in detail

A process outside of the jail can still write to the file system that
you consider to be jailed, depending upon permissions. If all your quota
calculations are only triggered by jailed processes writing to the file
system, then you can exceed quota trivially.

Tom




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1243344263.9871.2.camel>