Why does devfs allow unlinking /dev/*? (kern/139014)

Bryan Drewery bdrewery at FreeBSD.org
Wed Sep 25 12:10:22 UTC 2013


I see that devfs_remove() allows anything to be removed and always
returns 0.

This causes problems for package building as many ports will run 'gcc -o
/dev/null file.c' which removes /dev/null. Simple rm /dev/null also
works. Of course 'rm /dev/*' works as well.

After this is done, 'dev rule apply path <path> unhide' is needed to
restore the files.

Why is this allowed?

Does this belong on arch@ instead?

-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20130925/a91e29ea/attachment.sig>


More information about the freebsd-fs mailing list