retro009
retro009

Reputation: 23

Restrict the usage of USB device to specific application

Is it possible to restrict the usage of a USB device to a specific application? At the moment every application can implement a specific SDK and use the USB device.

Upvotes: 1

Views: 230

Answers (1)

ralf htp
ralf htp

Reputation: 9422

in windows this is called exclusive access or exclusive mode. windows uses this frequently for keyboards and other HID devices for security reasons (shall prvent keyloggers from hooking...)

this also exists in linux. it can be invoked by using TIOCEXCL option of ioctl

ioctl(fd,TIOCEXCL)

root has always access ...

http://www.stackoverflow.com/questions/691676/getting-exclusive-access-to-a-tty-device-from-a-root-program-on-linux

http://lklm.iu.edu/hypermail/linux/kernel/0506.1/0384.html

http://www.stackoverflow.com/questions/39848203/difference-between-o-cloexec-and-tiocexcl

Upvotes: 1

Related Questions