Bug 667301 - SELinux policy problem with chrony
Summary: SELinux policy problem with chrony
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: chrony
Version: 14
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-05 06:59 UTC by Bastian Ebeling
Modified: 2011-01-06 14:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-06 14:00:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
.te-ruleset by audit2allow (375 bytes, application/octet-stream)
2011-01-05 07:04 UTC, Bastian Ebeling
no flags Details
.pp-ruleset by audit2allow (1.19 KB, application/octet-stream)
2011-01-05 07:05 UTC, Bastian Ebeling
no flags Details

Description Bastian Ebeling 2011-01-05 06:59:24 UTC
Description of problem:
After successful installation of chrony into my fresh fine running fc14 (2.6.35.10-74 kernel) in Oracle VM VirtualBox (3.2.12 r68302) on my Intel Core Quad Q9550 I got SELinux complains:
/usr/sbin/chronyd like to read/write to chronyd.pid.
Further I found entries in /var/log/messages, that /var/lib/chrony/drift could not be opened.
Also no files in /var/log/chrony got created.

I ran "grep chronyd /var/log/audit/audit*|audit2allow"
and got

#============= chronyd_t ==============
#!!!! This avc can be allowed using the boolean 'allow_daemons_use_tty'

allow chronyd_t user_devpts_t:chr_file { read write };
allow chronyd_t var_run_t:file { read write };

and created my local rule by "grep chronyd /var/log/audit/audit*|audit2allow -M localchronydrules". After installation of this rule, again no files in /var/log/chrony got created - even after a restart.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Bastian Ebeling 2011-01-05 07:04:36 UTC
Created attachment 471806 [details]
.te-ruleset by audit2allow

Comment 2 Bastian Ebeling 2011-01-05 07:05:10 UTC
Created attachment 471807 [details]
.pp-ruleset by audit2allow

Comment 3 Miroslav Lichvar 2011-01-05 14:30:38 UTC
Hm, I don't see it here, with allow_daemons_use_tty off.

Comment 4 Daniel Walsh 2011-01-05 20:18:22 UTC
I think you have something mislabeled in /var/run

restorecon -R -v /var/run /var/log


Should fix.

This looks like a leaked file descriptor

allow chronyd_t user_devpts_t:chr_file { read write };

Comment 5 Bastian Ebeling 2011-01-06 14:00:57 UTC
Hi,

I tried "restorecon ..." and that did not work.
But later (sorry) I found, that in my "chrony.conf" the log-dir was set up fine - but the instances to log have been commented out... Thus no files got produces - as it should be.
Maybe the defaults should be changed?
It seems to be running fine now.
Thanks for your assistance.


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