Bug 600828 - ERROR:Could not set exec context when using cronjobs
Summary: ERROR:Could not set exec context when using cronjobs
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-06 08:45 UTC by Gijs Boer
Modified: 2010-09-15 12:15 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-09-15 12:15:35 UTC


Attachments (Terms of Use)

Description Gijs Boer 2010-06-06 08:45:54 UTC
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 15:25:37 UTC
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 08:50:13 UTC
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 12:15:35 UTC
Ok reopen if it happens again.


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