From owner-freebsd-current Sun Oct 27 18:11:10 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1603337B401 for ; Sun, 27 Oct 2002 18:11:09 -0800 (PST) Received: from edgemaster.zombie.org (edgemaster.creighton.edu [147.134.112.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B40643E4A for ; Sun, 27 Oct 2002 18:11:08 -0800 (PST) (envelope-from smkelly@zombie.org) Received: by edgemaster.zombie.org (Postfix, from userid 1001) id DCEEC414D9; Sun, 27 Oct 2002 20:11:07 -0600 (CST) Date: Sun, 27 Oct 2002 20:11:07 -0600 From: Sean Kelly To: current@freebsd.org Subject: Interesting devfs bug Message-ID: <20021028021107.GA16371@edgemaster.zombie.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG When playing with jail earlier, I found an interesting bug in devfs. After playing with devfs a bit more, I found that jail isn't necessary to cause the bug to show itself. Here's a copy of the session. The problem should be obvious. edgemaster# uname -a FreeBSD edgemaster.zombie.org 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Fri Oct 25 23:27:50 CDT 2002 root@edgemaster.zombie.org:/usr/obj/usr/src/sys/EDGEMASTER i386 edgemaster# mount -t devfs none /mnt edgemaster# cd /mnt edgemaster# devfs -m . ruleset 10 edgemaster# devfs -m . rule add hide edgemaster# devfs -m . rule add path 'random' unhide edgemaster# devfs -m . rule applyset edgemaster# ln -s random urandom edgemaster# ln -s random urandom edgemaster# ln -s random urandom edgemaster# ln -s random urandom edgemaster# ls random urandom urandom urandom urandom edgemaster# ls -l ls: urandom: No such file or directory ls: urandom: No such file or directory ls: urandom: No such file or directory ls: urandom: No such file or directory total 0 crw-rw-rw- 1 root wheel 2, 3 Oct 27 16:00 random edgemaster# rm urandom rm: urandom: No such file or directory edgemaster# ls random urandom urandom urandom urandom edgemaster# cd / edgemaster# umount /mnt -- Sean Kelly | PGP KeyID: 77042C7B smkelly@zombie.org | http://www.zombie.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message