Bug 600828 - ERROR:Could not set exec context when using cronjobs
ERROR:Could not set exec context when using cronjobs
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.5
All Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Walsh
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-06 04:45 EDT by Gijs Boer
Modified: 2010-09-15 08:15 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-15 08:15:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Gijs Boer 2010-06-06 04:45:54 EDT
Description of problem:
When I set cronjobs using /etc/crontab or run crontab -e as root, I get errors in my cronlog saying that SELinux would otherwise deny this (SELinux is set to permissive mode atm). I get the following errors:
CRON (*system*) ERROR:Could not set exec context to user_u:system_r:unconfined_t for user,  but SELinux in permissive mode, continuing
When set from /etc/crontab and:
CRON (root) ERROR:Could not set exec context to root:system_r:unconfined_t:SystemLow-SystemHigh for user,  but SELinux in permissive mode, continuing
When set from crontab -e (as root)

I assume it has something to do with the context of my cronfiles, but I don't really know which context to set them to. The cronjobs work if I put them in /etc/cron.hourly.

Version-Release number of selected component (if applicable):
vixie-cron-4.1-77.el5_4.1
selinux-policy-2.4.6-279.el5
selinux-policy-targeted-2.4.6-279.el5
selinux-policy-devel-2.4.6-279.el5

How reproducible:
Set a cronjob by using /etc/crontab or by using crontab -e

Actual results:
Errors from SELinux:
CRON (*system*) ERROR:Could not set exec context to user_u:system_r:unconfined_t for user,  but SELinux in permissive mode, continuing
CRON (root) ERROR:Could not set exec context to root:system_r:unconfined_t:SystemLow-SystemHigh for user,  but SELinux in permissive mode, continuing

Expected results:
No errors from SELinux (and allowing the jobs to run without problems).

Additional info:
Comment 1 Miroslav Grepl 2010-09-14 11:25:37 EDT
Are you still seeing this problem? If yes, what is your output of the following command

# ps -eZ | grep crond
Comment 2 Gijs Boer 2010-09-15 04:50:13 EDT
No, I can't see the problem anymore. I was forced to do a reboot of the server last week, and afaik, the bug hasn't reappeared yet. So whatever it was, it's not there anymore. I guess the bugreport can be closed since it seems that I am the only one that had this problem.
Comment 3 Daniel Walsh 2010-09-15 08:15:35 EDT
Ok reopen if it happens again.

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