HomeFreeBSD

make path matching in devfs rules consistent and sane (and safer)
rS253677Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

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

Details

Provenance
avgAuthored on
Parents
rS253676: - Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
Branches
Unknown
Tags
Unknown

Event Timeline