Date: Wed, 16 Sep 2015 11:58:38 -0500 From: Kevin Day <toasty@dragondata.com> To: Jan Bramkamp <crest@rlwinm.de> Cc: freebsd-fs@freebsd.org Subject: Re: Neutered devices in jails (per FS flag?) Message-ID: <7D445BFC-AB18-4EAD-8065-F0A934B1A479@dragondata.com> In-Reply-To: <55F99F5A.302@rlwinm.de> References: <E0C9157B-0FB7-4B2B-9BA2-5779DA7877FF@dragondata.com> <55F99F5A.302@rlwinm.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 16/09/15 18:30, Kevin Day wrote: >> We=E2=80=99re currently using jails to allow servers to copy backups = of themselves to a central backup server. The problem we=E2=80=99re = having is with mknod/devices. Currently jails don=E2=80=99t allow device = files to be created, which makes sense - you don=E2=80=99t want them to = be able to bypass the jail by opening /dev/kmem or something. We want = jails to be able to create device files, just not be able to open/use = them. >>=20 >> Has anyone given any thought to changing this behavior? Allowing = jails to create/manipulate device files, but not actually opening them? = I.e. instead of returning EPERM on creating the device, instead return = EPERM on opening it? This would likely need to be a filesystem flag, = because jails still require some devices to work (a separate devfs mount = or something). We could make the jail=E2=80=99s /dev read only or use = devfs so those devices still work, but have the parent jail directory = with a =E2=80=9Cnoopendev=E2=80=9D flag or something similar. >>=20 >> Has anyone gone down this path before? >=20 > There is no reason to backup device files on FreeBSD because FreeBSD = uses a dynamic devfs. Backup the devfs rules and devfs.conf instead of = the device files. We=E2=80=99re backing up non-FreeBSD systems, as well as some software = that creates its own devices inside a mini-chroot it needs to run.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7D445BFC-AB18-4EAD-8065-F0A934B1A479>