[patch 05/17] usb: usb_set_configuration() obeys authorization
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
01-usb-usb-set-configuration-obeys-authorization.patch
(text/plain, 1.5 KB)
Will refuse to configure a non-authorized device. Signed-off-by: Inaky Perez-Gonzalez <[email protected]> --- drivers/usb/core/message.c | 5 +++++ 1 file changed, 5 insertions(+) Index: linux.hg/drivers/usb/core/message.c =================================================================== --- linux.hg.orig/drivers/usb/core/message.c 2007-07-18 10:05:25.000000000 -0700 +++ linux.hg/drivers/usb/core/message.c 2007-07-18 10:05:48.000000000 -0700 @@ -1413,6 +1413,9 @@ * channels are available independently; and choosing between open * standard device protocols (like CDC) or proprietary ones. * + * Note that a non-authorized device (dev->authorized == 0) will only + * be put in unconfigured mode. + * * Note that USB has an additional level of device configurability, * associated with interfaces. That configurability is accessed using * usb_set_interface(). @@ -1434,6 +1437,8 @@ struct usb_interface **new_interfaces = NULL; int n, nintf; + if (dev->authorized == 0) + configuration = -1; if (configuration == -1) configuration = 0; else { -- Inaky ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel