Bug 1043486 - SELinux is preventing /usr/sbin/sensord from 'write' accesses on the directory /var/log.
Summary: SELinux is preventing /usr/sbin/sensord from 'write' accesses on the director...
Keywords:
Status: CLOSED DUPLICATE of bug 1043490
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:62292f06dd830be5062345e5910...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-16 12:48 UTC by steinach2810
Modified: 2013-12-16 16:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-16 16:36:29 UTC
Type: ---


Attachments (Terms of Use)

Description steinach2810 2013-12-16 12:48:01 UTC
Description of problem:
trying to start sensord.service with ExecStart = /usr/sbin/sensord -i $INTERVAL -l $LOG_INTERVAL --rrd-file /var/log/sensord.rrd

the Round Robin Database, which should keep the sensord daemon's (/var/log/sensord.rrd) was not allowed to be created by the daemon after running "sudo service sensord start", when it should.

systemctl status sensord.service:

sensord.service - Sensor Information Logging
   Loaded: loaded (/usr/lib/systemd/system/sensord.service; disabled)
   Active: failed (Result: exit-code) since Mon 2013-12-16 14:42:01 EET; 4min 43s ago
  Process: 13522 ExecStart=/usr/sbin/sensord -i $INTERVAL -l $LOG_INTERVAL --rrd-file /var/log/sensord.rrd (code=exited, status=1/FAILURE)

Dec 16 14:42:01 localhost.localdomain sensord[13522]: Creating round robin database
Dec 16 14:42:01 localhost.localdomain systemd[1]: sensord.service: control process exited, code=exited status=1
Dec 16 14:42:01 localhost.localdomain systemd[1]: Failed to start Sensor Information Logging.
Dec 16 14:42:01 localhost.localdomain systemd[1]: Unit sensord.service entered failed state.
SELinux is preventing /usr/sbin/sensord from 'write' accesses on the directory /var/log.

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

If you believe that sensord should be allowed write access on the log directory 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 sensord /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sensord_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log [ dir ]
Source                        sensord
Source Path                   /usr/sbin/sensord
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           lm_sensors-sensord-3.3.3-3.fc19.x86_64
Target RPM Packages           filesystem-3.2-13.fc19.x86_64
Policy RPM                    selinux-policy-3.12.1-74.15.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.10-200.fc19.x86_64 #1 SMP Mon
                              Dec 2 20:28:03 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-12-16 14:42:01 EET
Last Seen                     2013-12-16 14:42:01 EET
Local ID                      09b4fb94-91aa-4ee5-afe5-2af3fd2d9c26

Raw Audit Messages
type=AVC msg=audit(1387197721.154:744780): avc:  denied  { write } for  pid=13522 comm="sensord" name="log" dev="sda3" ino=3014671 scontext=system_u:system_r:sensord_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir


type=SYSCALL msg=audit(1387197721.154:744780): arch=x86_64 syscall=open success=no exit=EACCES a0=7fffde3ddf10 a1=242 a2=1b6 a3=7fffde3dba90 items=0 ppid=1 pid=13522 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=sensord exe=/usr/sbin/sensord subj=system_u:system_r:sensord_t:s0 key=(null)

Hash: sensord,sensord_t,var_log_t,dir,write

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.10-200.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-12-16 16:36:29 UTC

*** This bug has been marked as a duplicate of bug 1043490 ***


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