Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237416 - sys-apps/smartmontools: needs selinux policy ebuild
Summary: sys-apps/smartmontools: needs selinux policy ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Chris PeBenito (RETIRED)
URL:
Whiteboard:
Keywords:
: 328303 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-11 19:03 UTC by Jason G.
Modified: 2011-02-06 22:43 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild which installs the policy (selinux-smartmon-20070928.ebuild,127 bytes, text/plain)
2008-09-11 19:05 UTC, Jason G.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason G. 2008-09-11 19:03:12 UTC
A policy for smartmontools exists within the selinux-base-policy-20070928 source, but there is no corresponding sec-policy/selinux-smartmontools package available.

smartd has problems gathering data when selinux is set to strict/enforcing without this policy in place (I have not tested targeted/enforcing). It runs as system_u:system_r:initrc_t and has no access to the disks. Installing the policy seems to have fixed the problems.

After this ebuild is created, the ebuild for sys-apps/smartmontools should be updated to add in the selinux use flag.

Reproducible: Always

Steps to Reproduce:
1. emerge smartmontools
2. Start the smartd daemon
3. Set selinux to enforcing mode

Actual Results:  
smartd cannot access the hard disks without the policy in place.

Expected Results:  
smartd should have been able to gather SMART information from the drive. This is fixed with the policy in place.

smartd.log:
Device: /dev/hda, Permission denied, open() failed

audit.log:
type=AVC msg=audit(1221128467.385:2615): avc:  denied  { read } for  pid=3178 comm="smartd" name="hda" dev=tmpfs ino=2326 scontext=system_u:system_r:initrc_t tcontext=system_u:o
bject_r:fixed_disk_device_t tclass=blk_file
type=SYSCALL msg=audit(1221128467.385:2615): arch=40000003 syscall=5 success=no exit=-13 a0=8097298 a1=800 a2=8098588 a3=806b779 items=0 ppid=1 pid=3178 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="smartd" exe="/usr/sbin/smartd" subj=system_u:system_r:initrc_t key=(null)
Comment 1 Jason G. 2008-09-11 19:05:32 UTC
Created attachment 165210 [details]
ebuild which installs the policy
Comment 2 Chris Richards 2011-01-31 23:41:17 UTC
Included in selinux-smartmon-20101213
Comment 3 Chris Richards 2011-01-31 23:41:28 UTC
Can we close this?
Comment 4 Anthony Basile gentoo-dev 2011-02-06 22:43:52 UTC
*** Bug 328303 has been marked as a duplicate of this bug. ***