Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: I did a clean install of f22 workstation from a LiveUSB stick. After adding the lirc/lirc-core/lirc-libs packages and attempting to use a Remote control, I found the following error in /var/log/messages: Jul 21 14:26:50 theatre lircd: lircd-0.9.2a[1115]: default_init(): Permission denied Jul 21 14:26:50 theatre lircd-0.9.2a[1115]: Error: could not open /dev/lirc0 "lircd" is now running under user "lirc" which is a change from f20 (last release I am familiar with) where it ran as user "root" ps -ef | grep lircd lirc 1113 1 0 16:38 ? 00:00:00 /usr/sbin/lircd --nodaemon But the /dev/lirc0 device is readable only by root: ls -ls /dev/lirc0 0 crw-------. 1 root root 248, 0 Jul 21 16:37 /dev/lirc0 I see that a udev rule comes in lirc-core, but is not installed by default: /usr/share/lirc/contrib/60-lirc.rules contains: KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", GROUP="lirc", MODE="0660" This rule would change the permission to: 0 crw-rw----. 1 root lirc 248, 0 Jul 21 16:37 /dev/lirc0 which should work (I haven't tried it). The rule I use is: KERNEL=="lirc*", SUBSYSTEM=="lirc", OWNER="lirc" Which changes the owner of the device to lirc so that it can be read/written by the lircd process. Version-Release number of selected component (if applicable): lirc 0.9.2a How reproducible: Steps to Reproduce: As root: 1. fresh install of f22 1.5: setenforce Permissive 2. dnf install lirc 3. install a conf file in /etc/lirc/lircd.conf.d that corresponds to the remote 3. systemctl enable lircd 4. systemctl start lircd As a normal user: 5: /usr/bin/irw Actual results: The "Permission denied" messages above Expected results: irw connects to the lircd daemon and receives remote control info. Additional info: Install I used was on an IntelNUC with built in IR receiver. You don't necessarily need a working remote control to reproduce as the error is seen as irw starts up.
I have released previews of 0.9.3 at https://copr.fedoraproject.org/coprs/leamas/lirc-0.9.3preview including this patch. Unless requested, I don't plan to make new 0.9.2 release just for this issue.
(In reply to Alec Leamas from comment #1) > I have released previews of 0.9.3 at > https://copr.fedoraproject.org/coprs/leamas/lirc-0.9.3preview including this > patch. Unless requested, I don't plan to make new 0.9.2 release just for > this issue. Thanks for the preview release. Note that if you do end up adding this udev rule to a 0.9.2 package, the OWNER of the device node will also have to be set to "lirc", not just GROUP. 0.9.2 calls setuid() but leaves its groups alone; it looks like a call to setgid() is introduced in 0.9.3. I bring this up because I will soon be raising a bug report against selinux-policy-targeted to make these setuid() and setgid() calls actually succeed. With the current policy on F22 they are denied, which means if SELinux is enforcing lircd is unable to drop privileges and it keeps running as root.
Thanks for bringing this up! I don't think setting the owner is necessary. 0.9.3 also sets the groups and gid, see https://sourceforge.net/p/lirc/git/ci/58374e7b290997925b4b and https://sourceforge.net/p/lirc/git/ci/58374e7
lirc-0.9.3-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15207
lirc-0.9.3-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15228
lirc-0.9.3-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update lirc'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15207
lirc-0.9.3-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15270
lirc-0.9.3-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update lirc'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15270
lirc-0.9.3-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update lirc'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15228
lirc-0.9.3-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15465
lirc-0.9.3-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update lirc'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15465
@Michael (on a sidenote): Before you file any selinux bugs, perhaps you could have a look at http://ur1.ca/nt3x8 where I try to cope with the obvious selinux problems? TBH, I havn't really used the selinux stuff until now, so I probably make all kinds of errors.
lirc-0.9.3-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Hi! Just upgraded to Fedora 22. Just hit this bug. Can workaround with a manual chmod, of course. But any chance we can get the fix pushed for F22 also (as it was the original bug-filed version). I'm not planning on F23'ing any time soon. Thanks!