Bug 959713 - Monitoring an UPS on a serial port doesn't work out of the box
Summary: Monitoring an UPS on a serial port doesn't work out of the box
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: i686
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-05 01:20 UTC by Vadim Trochinsky
Modified: 2013-05-21 08:42 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.11.1-95.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-21 08:42:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vadim Trochinsky 2013-05-05 01:20:05 UTC
Description of problem:

NUT as shipped is forbidden from using serial ports by SELinux. This apparently can be fixed by daemons_use_tty = on, but the error produced is suppressed by default, which makes things confusing. Also it shouldn't be required to enable TTYs system-wide just for the sake of one service that has a good reason to use them.


Steps to Reproduce:
1. Configure with UPS at /dev/ttyUSB0
2. systemctl start nut-driver.service
  
Actual results: Service fails to start
Expected results: Service should start

Additional info:

I generated the following policy:

module nut-local 1.0;

require {
        type usbtty_device_t;
        type nut_upsdrvctl_t;
        class chr_file { write ioctl read lock open getattr };
}

#============= nut_upsdrvctl_t ==============
#!!!! This avc can be allowed using the boolean 'daemons_use_tty'


allow nut_upsdrvctl_t usbtty_device_t:chr_file { read write getattr open lock ioctl };

Comment 1 Miroslav Grepl 2013-05-06 11:36:00 UTC
commit 1be16f1fff250e1091068a4b6ea6dc5bfd274534
Author: Miroslav Grepl <mgrepl>
Date:   Mon May 6 13:35:26 2013 +0200

    Allow NUT to use serial ports

Comment 2 Fedora Update System 2013-05-07 21:30:25 UTC
selinux-policy-3.11.1-94.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-94.fc18

Comment 3 Fedora Update System 2013-05-09 10:12:55 UTC
Package selinux-policy-3.11.1-94.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-94.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7743/selinux-policy-3.11.1-94.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-05-17 11:02:10 UTC
selinux-policy-3.11.1-95.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-95.fc18

Comment 5 Fedora Update System 2013-05-21 08:42:17 UTC
selinux-policy-3.11.1-95.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.