From owner-svn-src-user@FreeBSD.ORG Wed Oct 15 14:38:36 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A23A10656A6; Wed, 15 Oct 2008 14:38:36 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB0618FC08; Wed, 15 Oct 2008 14:38:35 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9FEcZnF036138; Wed, 15 Oct 2008 14:38:35 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9FEcZfN036130; Wed, 15 Oct 2008 14:38:35 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200810151438.m9FEcZfN036130@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 15 Oct 2008 14:38:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183917 - in user/netchild/jailmount/src/sys: fs/cd9660 fs/msdosfs fs/ntfs fs/nullfs fs/smbfs fs/udf fs/unionfs nfsclient X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2008 14:38:36 -0000 Author: netchild Date: Wed Oct 15 14:38:35 2008 New Revision: 183917 URL: http://svn.freebsd.org/changeset/base/183917 Log: Allow to mount some more FSes from within a jail. Do not use this for your production jails, a jail may be able to panic a machine with this. If you want to play around (and harden some FSes), go ahead and merge it into your tree. Modified: user/netchild/jailmount/src/sys/fs/cd9660/cd9660_vfsops.c user/netchild/jailmount/src/sys/fs/msdosfs/msdosfs_vfsops.c user/netchild/jailmount/src/sys/fs/ntfs/ntfs_vfsops.c user/netchild/jailmount/src/sys/fs/nullfs/null_vfsops.c user/netchild/jailmount/src/sys/fs/smbfs/smbfs_vfsops.c user/netchild/jailmount/src/sys/fs/udf/udf_vfsops.c user/netchild/jailmount/src/sys/fs/unionfs/union_vfsops.c user/netchild/jailmount/src/sys/nfsclient/nfs_vfsops.c Modified: user/netchild/jailmount/src/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/fs/cd9660/cd9660_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/fs/cd9660/cd9660_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -85,7 +85,7 @@ static struct vfsops cd9660_vfsops = { .vfs_unmount = cd9660_unmount, .vfs_vget = cd9660_vget, }; -VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY); +VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY|VFCF_JAIL); MODULE_VERSION(cd9660, 1); static int iso_mountfs(struct vnode *devvp, struct mount *mp); Modified: user/netchild/jailmount/src/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/fs/msdosfs/msdosfs_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/fs/msdosfs/msdosfs_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -968,5 +968,5 @@ static struct vfsops msdosfs_vfsops = { .vfs_unmount = msdosfs_unmount, }; -VFS_SET(msdosfs_vfsops, msdosfs, 0); +VFS_SET(msdosfs_vfsops, msdosfs, VFCF_JAIL); MODULE_VERSION(msdosfs, 1); Modified: user/netchild/jailmount/src/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/fs/ntfs/ntfs_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/fs/ntfs/ntfs_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -791,5 +791,5 @@ static struct vfsops ntfs_vfsops = { .vfs_unmount = ntfs_unmount, .vfs_vget = ntfs_vget, }; -VFS_SET(ntfs_vfsops, ntfs, 0); +VFS_SET(ntfs_vfsops, ntfs, VFCF_JAIL); MODULE_VERSION(ntfs, 1); Modified: user/netchild/jailmount/src/sys/fs/nullfs/null_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/fs/nullfs/null_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/fs/nullfs/null_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -368,4 +368,4 @@ static struct vfsops null_vfsops = { .vfs_vget = nullfs_vget, }; -VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK); +VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK|VFCF_JAIL); Modified: user/netchild/jailmount/src/sys/fs/smbfs/smbfs_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/fs/smbfs/smbfs_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/fs/smbfs/smbfs_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -95,7 +95,7 @@ static struct vfsops smbfs_vfsops = { }; -VFS_SET(smbfs_vfsops, smbfs, VFCF_NETWORK); +VFS_SET(smbfs_vfsops, smbfs, VFCF_NETWORK|VFCF_JAIL); MODULE_DEPEND(smbfs, netsmb, NSMB_VERSION, NSMB_VERSION, NSMB_VERSION); MODULE_DEPEND(smbfs, libiconv, 1, 1, 2); Modified: user/netchild/jailmount/src/sys/fs/udf/udf_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/fs/udf/udf_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/fs/udf/udf_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -130,7 +130,7 @@ static struct vfsops udf_vfsops = { .vfs_unmount = udf_unmount, .vfs_vget = udf_vget, }; -VFS_SET(udf_vfsops, udf, VFCF_READONLY); +VFS_SET(udf_vfsops, udf, VFCF_READONLY|VFCF_JAIL); MODULE_VERSION(udf, 1); Modified: user/netchild/jailmount/src/sys/fs/unionfs/union_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/fs/unionfs/union_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/fs/unionfs/union_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -560,4 +560,4 @@ static struct vfsops unionfs_vfsops = { .vfs_vget = unionfs_vget, }; -VFS_SET(unionfs_vfsops, unionfs, VFCF_LOOPBACK); +VFS_SET(unionfs_vfsops, unionfs, VFCF_LOOPBACK|VFCF_JAIL); Modified: user/netchild/jailmount/src/sys/nfsclient/nfs_vfsops.c ============================================================================== --- user/netchild/jailmount/src/sys/nfsclient/nfs_vfsops.c Wed Oct 15 14:36:03 2008 (r183916) +++ user/netchild/jailmount/src/sys/nfsclient/nfs_vfsops.c Wed Oct 15 14:38:35 2008 (r183917) @@ -134,7 +134,7 @@ static struct vfsops nfs_vfsops = { .vfs_unmount = nfs_unmount, .vfs_sysctl = nfs_sysctl, }; -VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK); +VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK|VFCF_JAIL); /* So that loader and kldload(2) can find us, wherever we are.. */ MODULE_VERSION(nfs, 1);