Bug 981481 - SELinux is preventing /usr/sbin/upsdrvctl from execute_no_trans access on the file /usr/sbin/blazer_usb
SELinux is preventing /usr/sbin/upsdrvctl from execute_no_trans access on the...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-04 18:12 EDT by Rubén Lledó
Modified: 2013-07-22 11:46 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-65.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-20 05:33:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
SELinux label of /usr/sbin/blazer_usb (48.40 KB, image/png)
2013-07-04 18:12 EDT, Rubén Lledó
no flags Details

  None (edit)
Description Rubén Lledó 2013-07-04 18:12:40 EDT
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.
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 07:41:36 EDT
d796dcb5910a3d9b01511954d89b2a1bd612a5c7 allows this in git.
Comment 2 Fedora Update System 2013-07-17 07:53:11 EDT
selinux-policy-3.12.1-65.fc19 has been submitted as an update for Fedora 19.
Comment 3 Fedora Update System 2013-07-18 02:00:36 EDT
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:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-07-20 05:33:25 EDT
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 Lledó 2013-07-22 11:46:19 EDT
selinux-policy solved this bug. Now working. Thanks!

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