Bug 244990 - anacron does not start under targeted policy
Summary: anacron does not start under targeted policy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-20 13:16 UTC by Tomasz Ostrowski
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version: 2.6.4-22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-20 09:52:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tomasz Ostrowski 2007-06-20 13:16:21 UTC
Description of problem:
Anacron could not start under targeted policy.

This is logged to /var/log/cron:
Jun 20 14:59:17 pancernik anacron[3090]: Anacron 2.3 started on 2007-06-20
Jun 20 14:59:17 pancernik anacron[3090]: Can't open timestamp file for job
cron.daily: Permission denied
Jun 20 14:59:17 pancernik anacron[3090]: Aborted

Under permissive policy there're following denials reported by audit2allow, when
/var/spool/anacron/ is empty:
allow crond_t var_spool_t:dir { write add_name };
allow crond_t var_spool_t:file { write create setattr };

Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.6.4-20.fc7

How reproducible:
Always

Steps to Reproduce:
1. service anacron start
2. service anacron status
  
Actual results:
anacron is stopped

Expected results:
anacron (pid 3167) is running...

Additional info:
This is current updates-testing policy.

This is 3rd time in FC7 a basic system service is not working because of
selinux. Is there any chance of an automatic basic functionality testing for
policy changes? If it is possible to log in by ssh using password or key, does
essential daemons like dovecot, httpd, cron, bind, etc. still work and reply to
requests?

For most services upstream often do have regression tests. We do need these for
policy...

Comment 1 Daniel Walsh 2007-06-20 13:30:14 UTC
restorecon -R -v /var/spool

Should fix.

Comment 2 Tomasz Ostrowski 2007-06-20 13:40:35 UTC
Does not.

# restorecon -R -v /var/spool/
# service anacron start
# service anacron status
Starting anacron:                                          [  OK  ]
anacron is stopped

# ls -lZ /var/spool/anacron
-rw-------  root root user_u:object_r:var_spool_t      cron.daily
-rw-------  root root user_u:object_r:var_spool_t      cron.monthly
-rw-------  root root user_u:object_r:var_spool_t      cron.weekly


Comment 3 Daniel Walsh 2007-06-20 13:57:10 UTC
Ok, Looks like this is missing from fc7.

chcon -R -t cron_spool_t /var/spool/anacron

Should fix this problem, and I will put the fix in build 22.
 


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