Bug 429291

Summary: restorecon causes selinux denial when run from cron job
Product: [Fedora] Fedora Reporter: long
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-05 22:17:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description long 2008-01-18 15:42:43 UTC
Description of problem: When restorecon is run as a cron job it produces:
SELinux is preventing /sbin/setfiles (setfiles_t) "write" to pipe (crond_t). 
I'm guessing this is restorecon trying to write output which should end up being
emailed by crond?


Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.0.8-74.fc8

How reproducible:
Every night.


Steps to Reproduce:
1. Create the cronjob: 04 4 * * * /sbin/restorecon -e /home/long/mnt -R -v
/home/long/pc
2. 
3.
  
Actual results:
Every day I find this message from setroubleshoot: SELinux is preventing
/sbin/setfiles (setfiles_t) "write" to pipe (crond_t).

Expected results:
No messages from setroubleshoot

Additional info:

Comment 1 Daniel Walsh 2008-01-21 20:07:32 UTC
# audit2allow -M mypol -i /var/log/audit/audit.log 
# semodule -i mypol.pp

Fixed in selinux-policy-3.0.8-79.fc8

Comment 2 long 2008-02-01 17:01:58 UTC
I think this is also leading to another selinux denial:

SELinux is preventing /usr/sbin/crond (setfiles_t) "sigchld" to (crond_t).

Happens at the same time as the other error message.


Comment 3 Daniel Walsh 2008-02-02 05:09:15 UTC
Fixed in selinux-policy-3.0.8-84.fc8

Comment 4 Daniel Walsh 2008-03-05 22:17:14 UTC
Bugs have been in modified for over one month.  Closing as fixed in current
release please reopen if the problem still persists.