Date: Sun, 07 Jan 2007 20:03:40 -0400 From: "Marc G. Fournier" <scrappy@hub.org> To: Michael Grant <mgrant@grant.org>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: /dev/null in a chroot Message-ID: <8A1292FC91669855CE9C3403@ganymede.hub.org> In-Reply-To: <62b856460701070753p62a3c531g63f08b164d23e6eb@mail.gmail.com> References: <62b856460701070753p62a3c531g63f08b164d23e6eb@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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 <mgrant@grant.org> 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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8A1292FC91669855CE9C3403>