Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 2002 20:11:07 -0600
From:      Sean Kelly <smkelly@zombie.org>
To:        current@freebsd.org
Subject:   Interesting devfs bug
Message-ID:  <20021028021107.GA16371@edgemaster.zombie.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021028021107.GA16371>