[GRLUG] GRLUG Potluck and Udev
Michael Mol
mikemol at gmail.com
Wed Dec 23 10:34:03 EST 2009
On Wed, Dec 23, 2009 at 9:54 AM, Ben Rousch <brousch at gmail.com> wrote:
> I had a great time at the GRLUG potluck last night. Thanks again,
> Casey, for letting us take over your garage!
>
> Someone asked a question about disabling a device that had been
> activated by udev, and I don't remember a conclusive answer
> being reached. This interesting article [1] showed up in my
> feed reader today, and it has a little information about udev.
> A little further reading courtesy of the Arch Linux wiki [2]
> makes me think that disabling the device after it has already
> been detected and running would require a device-specific
> command. Now you could prevent it from loading in the first
> place by using a udev rule, but I don't know that you can use
> udev to actually cripple it afterwards.
The general topic at that moment was the webcam built into laptops,
and how could one effectively disable the webcam without physically
removing or modifying the device.
Granted, a software method isn't going to be as effective, but the key
question is how do you get a behavior analogous to the device control
you get under Windows? (In particular, go to Control Panel -> System
-> Device Manager. You can enable and disable devices at the kernel
level from in there.)
The problem with the approaches discussed at first, such as removing
the /dev/video0 node, aren't ideal, because /dev/video0 is merely a
device node with a particular major/minor number binding it to a
particular device from the kernel's perspective. Anyone who can run
mknod can create a device node with the same capabilities just about
anywhere else and give it the same major/minor number.
Most specifically, the the question becomes "how can one disable and
enable a particular USB UVC (that webcame) device in software?" Most
generally, the question becomes "how can one disable and enable an
arbitrary device found in sysfs, in software?"
I haven't finished reading through the linked articles.
--
:wq
More information about the grlug
mailing list