freebsd-skq/sys/fs/devfs
Andriy Gapon 8e94193e58 make path matching in devfs rules consistent and sane (and safer)
Before this change path matching had the following features:
- for device nodes the patterns were matched against full path
- in the above case '/' in a path could be matched by a wildcard
- for directories and links only the last component was matched

So, for example, a pattern like 're*' could match the following entries:
- re0 device
- responder/u0 device
- zvol/recpool directory

Although it was possible to work around this behavior (once it was spotted
and understood), it was very confusing and contrary to documentation.

Now we always match a full path for all types of devfs entries (devices,
directories, links) and a '/' has to be matched explicitly.
This behavior follows the shell globbing rules.

This change is originally developed by Jaakko Heinonen.
Many thanks!

PR:		kern/122838
Submitted by:	jh
MFC after:	4 weeks
2013-07-26 14:25:58 +00:00
..
devfs_devs.c - Correct mispellings of the word necessary 2013-04-17 11:42:40 +00:00
devfs_dir.c Add reference counting for devfs paths containing user created symbolic 2010-09-27 17:47:09 +00:00
devfs_int.h Prefer __containerof() above member2struct(). 2012-09-15 19:28:54 +00:00
devfs_rule.c make path matching in devfs rules consistent and sane (and safer) 2013-07-26 14:25:58 +00:00
devfs_vfsops.c Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag. 2012-11-09 18:02:25 +00:00
devfs_vnops.c Stop translating the ERESTART error from the open(2) into EINTR. 2013-02-07 14:53:33 +00:00
devfs.h Introduce the "ruleset=number" option for devfs(5) mounts. 2012-02-09 10:09:12 +00:00