Re: devfs vs udev, thoughts from a devfs user

Helge Hafting
2004-02-11T09:52:37Z

Matthew Reppert wrote:

> At the very least, sysfs' and devfs' approaches to devices differ in
> philosophy. devfs says "here's a device node, you can tell where it is
> in the bus hierarchy by looking at its filename". sysfs, on the other
> hand, says "here's the device hierarchy", and gives you enough information
> to create device nodes for each point in the hierarchy if you wish to do
> so.
>
There's an interesting security implication here. I used to think
"why don't they make a device node instead of exporting
numbers, udev could then simply make a link to it"
It'd be simpler, and the minimalists could use the node in sysf directly.

The security advantage is that we don't get a device with some default
permissions that might get abused. The udev config can decide
to create a node with stricter than usual permissions, or decide
to not make the node at all.

Helge Hafting