limit jail disk space
jas_arlerr at yahoo.com.cn
Tue Jul 12 15:02:00 GMT 2005
Vlad GALU <vladgalu at gmail.com> Ð´µÀ£º
On 7/12/05, Jone Jas wrote:
> Thanks for your reply. I googled and found this method but I just
> did not have a try.
> As for the code-hacking method I mentioned, anyone with any idea
> is appreciated!
See ufs_quota.c, especially chkdqchg(). It is passed a struct
ucred* parameter, which contains a struct prison* pointer. So I assume you can make your decision based on that.
:Yes. It seems that following the quota way may help. Actually, the "#ifdef QUOTA" is scattered in many places, so trivial work need to do.
Of course, the userland quota management tools and the jail utilities need to be made aware of the kernel changes.
:Yes. It may need some new user utilities, e.g. jail_conf to do the configuration jobs (configure the jail's disk space) according to the kernel changes.
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.
More information about the freebsd-hackers