From owner-freebsd-questions@FreeBSD.ORG Mon Jan 8 00:03:38 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8320C16A40F for ; Mon, 8 Jan 2007 00:03:38 +0000 (UTC) (envelope-from scrappy@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB8613C46C for ; Mon, 8 Jan 2007 00:03:38 +0000 (UTC) (envelope-from scrappy@hub.org) Received: from localhost (unknown [200.46.204.182]) by hub.org (Postfix) with ESMTP id D95DB118B421; Sun, 7 Jan 2007 20:03:27 -0400 (AST) Received: from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 00742-03; Sun, 7 Jan 2007 20:03:27 -0400 (AST) Received: from ganymede.hub.org (blk-137-79-174.eastlink.ca [24.137.79.174]) by hub.org (Postfix) with ESMTP id 63951118B417; Sun, 7 Jan 2007 20:03:27 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 541053B05F; Sun, 7 Jan 2007 20:03:40 -0400 (AST) Date: Sun, 07 Jan 2007 20:03:40 -0400 From: "Marc G. Fournier" To: Michael Grant , FreeBSD Questions Message-ID: <8A1292FC91669855CE9C3403@ganymede.hub.org> In-Reply-To: <62b856460701070753p62a3c531g63f08b164d23e6eb@mail.gmail.com> References: <62b856460701070753p62a3c531g63f08b164d23e6eb@mail.gmail.com> X-Mailer: Mulberry/4.0.7 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: /dev/null in a chroot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2007 00:03:38 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 #!/bin/sh /sbin/devfs -m $1 rule apply hide /sbin/devfs -m $1 rule apply path null unhide where $1 == the dev directory you mount within the chroot environment ... - --On Sunday, January 07, 2007 16:53:27 +0100 Michael Grant wrote: > I chrooted apache to /www. > > In order to run a java program from a web page, java needs a /dev/null > inside the chroot. > > I don't want to create another whole /dev/ dir with all the disk raw > devices there to be read for anyone who cracks root. I just want a > /www/dev/null file. > > I tried creating a node with mknod exactly like the node in /dev but > it doesn't work in freebsd 6. /dev/ is special now and you can't just > create nodes anywhere like the old days. > > Is there a way to create a /www/dev/null which acts just like /dev/null? > > Michael Grant > - ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email . scrappy@hub.org MSN . scrappy@hub.org Yahoo . yscrappy Skype: hub.org ICQ . 7615664 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFoYpc4QvfyHIvDvMRAsKNAKCBQL1HfW0XiDQlWTQ7SMYxBOD7rwCeMPYk sZ45tw01yqCImIhanmHTtEQ= =YMRb -----END PGP SIGNATURE-----