Bug 1175068 - SELinux is preventing /usr/sbin/hddtemp from using the 'sys_admin' capabilities.
Summary: SELinux is preventing /usr/sbin/hddtemp from using the 'sys_admin' capabilities.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:48d7f3b3256cb9f39af6d0beba3...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-17 05:25 UTC by Janne Kettunen
Modified: 2015-01-30 23:54 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-105.fc21
Clone Of:
Environment:
Last Closed: 2015-01-30 23:54:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Janne Kettunen 2014-12-17 05:25:42 UTC
Description of problem:
SELinux is preventing /usr/sbin/hddtemp from using the 'sys_admin' capabilities.

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

If you believe that hddtemp should have the sys_admin capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep hddtemp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                staff_u:staff_r:staff_consolehelper_t:s0
Target Context                staff_u:staff_r:staff_consolehelper_t:s0
Target Objects                Unknown [ capability ]
Source                        hddtemp
Source Path                   /usr/sbin/hddtemp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           hddtemp-0.3-0.33.beta15.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-99.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.17.6-300.fc21.x86_64 #1 SMP Mon
                              Dec 8 22:29:32 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-12-17 07:17:39 EET
Last Seen                     2014-12-17 07:17:39 EET
Local ID                      564b5e38-fac3-4195-aa7d-157260d26e6f

Raw Audit Messages
type=AVC msg=audit(1418793459.688:298): avc:  denied  { sys_admin } for  pid=5407 comm="hddtemp" capability=21  scontext=staff_u:staff_r:staff_consolehelper_t:s0 tcontext=staff_u:staff_r:staff_consolehelper_t:s0 tclass=capability permissive=0


type=SYSCALL msg=audit(1418793459.688:298): arch=x86_64 syscall=ioctl success=no exit=EACCES a0=3 a1=31f a2=7fff2df3d480 a3=0 items=0 ppid=5406 pid=5407 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=5 comm=hddtemp exe=/usr/sbin/hddtemp subj=staff_u:staff_r:staff_consolehelper_t:s0 key=(null)

Hash: hddtemp,staff_consolehelper_t,staff_consolehelper_t,capability,sys_admin

Version-Release number of selected component:
selinux-policy-3.13.1-99.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.6-300.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2015-01-02 16:22:20 UTC
Staff_t should not be using usemod helper apps?  What were you trying to do?

Comment 2 Janne Kettunen 2015-01-05 05:46:47 UTC
Hi.

I can only guess its related to KSensors which I'm running in KDE Desktop.

This system is upgraded from fc20 originally and I have some my on custom policies made with audit2allow. Maybe I should try remove those fc20 custom policies and relabel filesystem and see what gives after that.

Comment 3 Daniel Walsh 2015-01-05 13:51:48 UTC
ebe618eea908ffc61a6f39459f3d40b079e00c7c allows this via transition in git.

Comment 4 Lukas Vrabec 2015-01-16 10:00:41 UTC
commit 2ef05e03976dcaadc1843fd3a3e7ccf02412aaab
Author: Dan Walsh <dwalsh>
Date:   Mon Jan 5 08:51:08 2015 -0500

    Allow domains that can use consolehelper to transition to hddtemp

Comment 5 Fedora Update System 2015-01-27 16:49:22 UTC
selinux-policy-3.13.1-105.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-105.fc21

Comment 6 Fedora Update System 2015-01-30 04:32:20 UTC
Package selinux-policy-3.13.1-105.fc21:
* should fix your issue,
* was pushed to the Fedora 21 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.13.1-105.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1337/selinux-policy-3.13.1-105.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2015-01-30 23:54:47 UTC
selinux-policy-3.13.1-105.fc21 has been pushed to the Fedora 21 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.