I simulated the run like this: sudo runcon system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 sh -c "/usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log" (that's from cron.d, and takes Quite A While to run) with enforcing turned off. Here's the complaints, which seem to match what actually happened during the nightly run: type=AVC msg=audit(1313877917.646:693368): avc: denied { read } for pid=14117 comm="grep" name="sought.conf" dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file type=AVC msg=audit(1313877917.646:693368): avc: denied { open } for pid=14117 comm="grep" name="sought.conf" dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file type=AVC msg=audit(1313877917.646:693369): avc: denied { ioctl } for pid=14117 comm="grep" path="/etc/mail/spamassassin/channel.d/sought.conf" dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file type=AVC msg=audit(1313877926.893:693373): avc: denied { read } for pid=14120 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file type=AVC msg=audit(1313877926.893:693373): avc: denied { open } for pid=14120 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file type=AVC msg=audit(1313877929.563:693376): avc: denied { setrlimit } for pid=14121 comm="gpg" scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tclass=process type=AVC msg=audit(1313877929.589:693377): avc: denied { ipc_lock } for pid=14121 comm="gpg" capability=14 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tclass=capability type=AVC msg=audit(1313878046.835:693474): avc: denied { signal } for pid=14142 comm="zsh" scontext=staff_u:staff_r:staff_t:s0 tcontext=staff_u:unconfined_r:unconfined_t:s0 tclass=process type=AVC msg=audit(1313883171.242:695645): avc: denied { read } for pid=15326 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file type=AVC msg=audit(1313883171.242:695645): avc: denied { open } for pid=15326 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file That zsh signal in the middle there is probably irrelevant crap. -Robin
Miroslav, I think we need a policy for sa-update running out of cron jobs. I added a preliminary policy to F16.
Fixed in selinux-policy-3.9.16-39.fc15
selinux-policy-3.9.16-39.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15
Package selinux-policy-3.9.16-39.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-39.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15 then log in and leave karma (feedback).
selinux-policy-3.9.16-39.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
Running: selinux-policy.noarch 3.9.16-42.fc15 selinux-policy-targeted.noarch 3.9.16-42.fc15 This is not fixed. Sorry I didn't notify earlier. Here's what I'm getting with setenforce 0: type=AVC msg=audit(10/07/2011 16:53:02.360:333529) : avc: denied { open } for pid=18056 comm=grep name=sought.conf dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:02.360:333529) : avc: denied { read } for pid=18056 comm=grep name=sought.conf dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:02.360:333530) : avc: denied { ioctl } for pid=18056 comm=grep path=/etc/mail/spamassassin/channel.d/sought.conf dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:03.256:333536) : avc: denied { open } for pid=18063 comm=sh name=meminfo dev=proc ino=4026532008 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:03.256:333536) : avc: denied { read } for pid=18063 comm=sh name=meminfo dev=proc ino=4026532008 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:03.256:333537) : avc: denied { getattr } for pid=18063 comm=sh path=/proc/meminfo dev=proc ino=4026532008 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:03.242:333535) : avc: denied { execute_no_trans } for pid=18063 comm=sa-update path=/bin/bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:03.242:333535) : avc: denied { read open } for pid=18063 comm=sa-update name=bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:03.242:333535) : avc: denied { execute } for pid=18063 comm=sa-update name=bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file type=AVC msg=audit(10/07/2011 16:53:03.257:333538) : avc: denied { getattr } for pid=18063 comm=sh path=/bin/bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file This seems to include some stuff that I reported before, and some stuff I didn't; I don't know why. -Robin
It is perhaps worth noting that this time I actually let cron run it (after commenting out the sleep line in the cron script). -Robin
Fixed in selinux-policy-3.9.16-43.fc15
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15
Package selinux-policy-3.9.16-48.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15 then log in and leave karma (feedback).
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.