Getting udev name from usb_device structure

2013-09-19 Thread Sergio Work
Hi all! I'm writting a LSM hook in order to allow to mount just only some particular USB Mass Storage devices according to their idVendor, idProduct, and Serial. The hook is executed when a device is going to be mounted, and it has the following prototype: static int sb_mount(const char *dev_name

Re: Getting udev name from usb_device structure

2013-09-20 Thread Sergio Work
> Why would this be an LSM hook? What's wrong with the existing solutions > for this that are all in userspace today? Because we want to apply the restriction of what USB pendrives can be mounted to all the users of the system, including root. So we need to perform this in kernel space, otherwise