Bug 1306104 - Unauthorized SELinux context; FAILED loading cron table
Unauthorized SELinux context; FAILED loading cron table
Status: CLOSED DUPLICATE of bug 1298192
Product: Fedora
Classification: Fedora
Component: cronie (Show other bugs)
23
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-09 21:22 EST by Michael Hampton
Modified: 2016-02-10 05:03 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-10 05:03:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Hampton 2016-02-09 21:22:10 EST
Description of problem:
crond refuses to load any user's crontabs from /var/spool/cron directory, and complains about the SELinux contexts.

Feb 09 20:33:33 saurok systemd[1]: Starting Command Scheduler...
Feb 09 20:33:33 saurok crond[30971]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 64% if used.)
Feb 09 20:33:33 saurok crond[30971]: (mirror) Unauthorized SELinux context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 file_context=unconfined_u:object_r:user_cron_spool_t:s0 (/var/spool/cron/mirror)
Feb 09 20:33:33 saurok crond[30971]: (mirror) FAILED (loading cron table)
Feb 09 20:33:33 saurok crond[30971]: (root) Unauthorized SELinux context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 file_context=unconfined_u:object_r:user_cron_spool_t:s0 (/var/spool/cron/root)
Feb 09 20:33:33 saurok crond[30971]: (root) FAILED (loading cron table)

crond seems to be running with the right context:

# ps axZ | grep crond
system_u:system_r:crond_t:s0-s0:c0.c1023 334 ? Ss     0:00 /usr/sbin/crond -n

The files themselves seem to have the right contexts:

# ls -aZ /var/spool/cron
    system_u:object_r:user_cron_spool_t:s0 .
          system_u:object_r:var_spool_t:s0 ..
unconfined_u:object_r:user_cron_spool_t:s0 mirror
unconfined_u:object_r:user_cron_spool_t:s0 root

Attempting to use restorecon had no effect:

# restorecon -r -v /var/spool/cron
restorecon:  Warning no default label for /var/spool/cron/mirror
restorecon:  Warning no default label for /var/spool/cron/root

No AVCs were logged.


Version-Release number of selected component (if applicable):
cronie-1.5.0-3.fc23.x86_64
selinux-policy-targeted-3.13.1-158.4.fc23.noarch


How reproducible:
Always


Steps to Reproduce:
1. crontab -e
2. systemctl restart crond


Actual results:
cron jobs fail to run; journal entries complain about Unauthorized SELinux context.


Expected results:
cron jobs run normally.


Additional info:
This appears to have begun immediately after upgrading from F22 to F23 a couple of weeks ago. No user cron jobs have run since the upgrade took place; only jobs in /etc/cron.* are being run.
Comment 1 Tomas Mraz 2016-02-10 05:03:02 EST

*** This bug has been marked as a duplicate of bug 1298192 ***

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