From:
[email protected]
This message is in MIME format which your mailer apparently does not support. You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility. Alternatively, ask the sender of this message to resend it in a different format.
Package: udev
Version: 0.030-1
Some /dev/input/event* devices *should* have mode 0640 (with suitable group permission) or mode 0644. For example:
I have a Hauppauge WinTV Nova-T (budget DVB-T) card. It comes with a remote control, and the kernel driver (budget-ci) exports the RC receiver device as
an input device (which happens to show up as /dev/input/event3 but has,
with different configurations, shown up as event2).
I'm running vdr with its own user and group, and have a remote control plugin for it which can identify which devices are input devices. The fix for bug 257165 breaks this: vdr cannot start up (though arguably there's a bug in vdr-plugin-remote - .debs available via the URL in my .sig).
The only way that I can see to fix this is to run an extra program after the device node has been created, since:
* the node is required in order to find the input device name (via an
ioctl);
* there doesn't appear to be sufficient information in sysfs;
* udev doesn't appear to support any way of script-set ownership and
permissions.
The attached program looks for DVB IR input devices and changes their access mode to something more suitable. It takes an optional access mode argument (default is 0644) and a list of devices, e.g.
fix_dvb_ir 0644 /dev/input/event*
--
| Darren Salt | linux (or ds) at | nr. Ashington,
| woody, sarge, | youmustbejoking | Northumberland
| RISC OS | demon co uk | Toon Army
| <URL:
http://www.youmustbejoking.demon.co.uk/progs.unstable.html>
Are you addicted to taglines? Call Tagliners Anonymous *now*!
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/input.h>
#define print_error(REASON) \
fprintf (stderr, "%s: " REASON " %s: %s\n", argv[0], argv[i], strerror (errno))
int main (int argc, char *argv[])
{
int i = 1;
long mode = 0644;
if (argc > 1 && argv[1][0] == '0')
{
mode = strtol (argv[1], NULL, 0);
i = 2;
}
for (; i < argc; ++i)
{
int fd = open (argv[i], O_RDONLY);
char desc[128];
if (fd == -1)
{
print_error ("open");
continue;
}
if (ioctl (fd, EVIOCGNAME (sizeof (desc)), desc) < 0)
print_error ("ioctl (input device name)");
else if (strstr (desc, "DVB") || strstr (desc, "dvb"))
{
printf ("found DVB IR device '%s'\n", argv[i]);
if (fchmod (fd, mode))
print_error ("chmod");
}
if (close (fd))
print_error ("close");
}
}
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)