Bug 981481

Summary: SELinux is preventing /usr/sbin/upsdrvctl from execute_no_trans access on the file /usr/sbin/blazer_usb
Product: [Fedora] Fedora Reporter: Rubén <rlledo>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-65.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-20 09:33:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
SELinux label of /usr/sbin/blazer_usb none

Description Rubén 2013-07-04 22:12:40 UTC
Created attachment 769023 [details]
SELinux label of /usr/sbin/blazer_usb

Description of problem: SELinux prevents nut-server from working.

Version-Release number of selected component (if applicable): 2.6.5-19.fc19

How reproducible: Try to start nut-server.service

Steps to Reproduce:
1. Install packages nut and nut-client.
2. Configure files /etc/ups/ups.conf, /etc/ups/nut.conf, /etc/ups/upsd.conf,  /etc/ups/ups.users and /etc/ups/upsmon.conf
3. Start driver by typing "sudo upsdrvctl start <your_ups_configured_name>"
4. Start nut server by typing "sudo systemctl start nut-server"

Actual results: message "A dependency job for nut-server.service failed. See 'journalctl -xn' for details" is reported.

Expected results: nut-server up and running.

Additional info (translated to english because text is in spanish, originally):
SELinux is preventing /usr/sbin/upsdrvctl from execute_no_trans access on the file /usr/sbin/blazer_usb.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you think that, by default, upsdrvctl should allow execute_no_trans access on blazer_usb file.     
Then you should report this as an error.
You can generate a local policy module to allow this access.
Do
allow temporal access by executing:
# grep upsdrvctl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:nut_upsdrvctl_t:s0
Target Context                system_u:object_r:nut_upsdrvctl_exec_t:s0
Target Objects                /usr/sbin/blazer_usb [ file ]
Source                        upsdrvctl
Source Path                   /usr/sbin/upsdrvctl
Port                          <Unknown>
Host                          hogar
Source RPM Packages           nut-2.6.5-12.fc19.x86_64
Target RPM Packages           nut-2.6.5-12.fc19.x86_64
Policy RPM                    selinux-policy-3.12.1-54.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     hogar
Platform                      Linux hogar 3.9.8-300.fc19.x86_64 #1 SMP Thu Jun
                              27 19:24:23 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-04 22:33:04 CEST
Last Seen                     2013-07-04 22:33:04 CEST
Local ID                      c0c5a491-b66b-4bc8-b28e-fd2ce6d65c1c

Raw Audit Messages
type=AVC msg=audit(1372969984.901:674): avc:  denied  { execute_no_trans } for  pid=19724 comm="upsdrvctl" path="/usr/sbin/blazer_usb" dev="dm-1" ino=167334 scontext=system_u:system_r:nut_upsdrvctl_t:s0 tcontext=system_u:object_r:nut_upsdrvctl_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1372969984.901:674): arch=x86_64 syscall=execve success=no exit=EACCES a0=7fff9ec52640 a1=7fff9ec52570 a2=7fff9ec52990 a3=7f300316ba10 items=0 ppid=19723 pid=19724 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=upsdrvctl exe=/usr/sbin/upsdrvctl subj=system_u:system_r:nut_upsdrvctl_t:s0 key=(null)

Hash: upsdrvctl,nut_upsdrvctl_t,nut_upsdrvctl_exec_t,file,execute_no_trans


Finally, I would like to remark that I had no problem with Fedora 18.

Comment 1 Daniel Walsh 2013-07-05 11:41:36 UTC
d796dcb5910a3d9b01511954d89b2a1bd612a5c7 allows this in git.

Comment 2 Fedora Update System 2013-07-17 11:53:11 UTC
selinux-policy-3.12.1-65.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-65.fc19

Comment 3 Fedora Update System 2013-07-18 06:00:36 UTC
Package selinux-policy-3.12.1-65.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-65.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13172/selinux-policy-3.12.1-65.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-07-20 09:33:25 UTC
selinux-policy-3.12.1-65.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Rubén 2013-07-22 15:46:19 UTC
selinux-policy 3.12.1.65 solved this bug. Now working. Thanks!