Question on SELinux AVC messages with systemd.

Lennart Poettering mzerqung at 0pointer.de
Wed Jul 21 23:24:39 UTC 2010


On Wed, 21.07.10 14:38, Dave Jones (davej at redhat.com) wrote:

>  > lvm is brain damaged.  strace lvm pvscan, and watch as it opens a bunch
>  > of stuff that there's no way there'd ever be a volume on.
>  > /dev/snd/*, tty's, usbmon etc etc
> 
> looking closer, it seems to be only stat'ing, instead of opening most of them,
> which isn't quite so bad, but still pretty lame.

If it really iterates through /dev then it smeels very much broken. If people
are interested in block devices /sys/class/block is a much better
choice.

And even if they really want to iterate through /dev they could at least
rely on dirent->d_type to avoid the extra stats(). d_type works fine on
devtmpfs (and the other fs choices crazy folks might use for /dev), so there's
really little need to stat() arbitrary directories...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list