[systemd-devel] Udev rules for interfaces

Greg KH gregkh at linuxfoundation.org
Fri Dec 25 11:55:03 UTC 2020


On Fri, Dec 25, 2020 at 11:01:47AM +0200, Adi Ml wrote:
> Hi,
> 
> I am trying to generate rules in udev to block mass storage. It seems like
> it only checks the device itself (its class is 00), but not its interface
> classes (one of those is 08, a mass storage). It seems like there is only
> attr{bDeviceClass} but there is attr{bInterfaceClass} only when I specify
> the interface number.
> 
> 
> How is it possible to set the rules against its interfaces too?

Yes, interfaces are "devices" according to the kernel, that is what
drivers are bound to.

But, again, please just use USBGuard, it handles all of this for you
automatically.

good luck!

greg k-h


More information about the systemd-devel mailing list