From owner-freebsd-current@FreeBSD.ORG Wed Jul 25 16:03:07 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF7716A41A; Wed, 25 Jul 2007 16:03:07 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from mail.ipt.ru (mail.ipt.ru [194.62.233.102]) by mx1.freebsd.org (Postfix) with ESMTP id 8E89C13C469; Wed, 25 Jul 2007 16:03:07 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from stat.sem.ipt.ru ([192.168.12.1] helo=ipt.ru) by mail.ipt.ru with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1IDjKP-000NcO-DR; Wed, 25 Jul 2007 20:03:09 +0400 Received: from bsam by ipt.ru with local (Exim 4.63 (FreeBSD)) (envelope-from ) id 1IDjKX-000BSm-7S; Wed, 25 Jul 2007 20:03:17 +0400 To: Pawel Jakub Dawidek References: <97732929@srv.sem.ipt.ru> <20070723133333.GF5456@garage.freebsd.pl> <78011660@srv.sem.ipt.ru> <20070724144549.GA12473@garage.freebsd.pl> <08401633@srv.sem.ipt.ru> <20070725145031.GJ12473@garage.freebsd.pl> <76240598@srv.sem.ipt.ru> <20070725151235.GK12473@garage.freebsd.pl> From: Boris Samorodov Date: Wed, 25 Jul 2007 20:03:17 +0400 In-Reply-To: <20070725151235.GK12473@garage.freebsd.pl> (Pawel Jakub Dawidek's message of "Wed\, 25 Jul 2007 17\:12\:35 +0200") Message-ID: <10167018@srv.sem.ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-current@FreeBSD.org Subject: Re: mount_nullfs inside a jail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2007 16:03:08 -0000 On Wed, 25 Jul 2007 17:12:35 +0200 Pawel Jakub Dawidek wrote: > On Wed, Jul 25, 2007 at 07:03:37PM +0400, Boris Samorodov wrote: > > > > This didn't help: > > > > ----- > > > > btest# sysctl security.jail > > > > security.jail.jailed: 1 > > > > security.jail.mount_allowed: 1 > > > > security.jail.chflags_allowed: 1 > > > > security.jail.allow_raw_sockets: 0 > > > > security.jail.enforce_statfs: 2 > > > > security.jail.sysvipc_allowed: 1 > > > > security.jail.socket_unixiproute_only: 1 > > > > security.jail.set_hostname_allowed: 1 > > > > btest# lsvfs > > > > Filesystem Refs Flags > > > > -------------------------------- ----- --------------- > > > > ufs 6 > > > > nfs 0 network > > > > procfs 0 synthetic > > > > devfs 3 synthetic > > > > ntfs 0 > > > > msdosfs 0 > > > > nfs4 0 network > > > > nullfs 1 loopback, jail > > > > cd9660 0 read-only > > > > btest# df > > > > Filesystem 1K-blocks Used Avail Capacity Mounted on > > > > /dev/da0s1d 945804208 22136782 848003090 3% / > > > > btest# mount /usr/ports/distfiles /mnt > > > > mount: /usr/ports/distfiles : Operation not permitted > > > > > mount_nullfs? > > > > Ops!!! (i need some coffee) My bad... Mounting works good but: > > ----- > > btest# umount /mnt > > umount: unmount of [restricted] failed: Invalid argument > > ----- > I overlooked. You need to set security.jail.enforce_statfs to 0. See if > that helps. Yep, that helps. But now "df" now shows a host file system, which is a little bit confusing. ;-) Well, but I guess there should be a consensus somewhere between features and wishes... Pawel, thanks for your help. WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve