Bug 502094

Summary: staff_t runs cronjobs as cronjob_t instead of staff_t
Product: [Fedora] Fedora Reporter: Dominick Grift <dominick.grift>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dwalsh, mgrepl, nphilipp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-28 12:38:54 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 Dominick Grift 2009-05-21 20:11:58 UTC
Description of problem:
staff_t runs cronjobs as cronjob_t instead of staff_t

Version-Release number of selected component (if applicable):
selinux-policy-3.6.12-36.fc11.noarch

How reproducible:
run a cronjob as staff_t

Expected results:
the crontjob should have the same permissions as the process that owns it (staff_t)

Additional info:

Comment 1 Bug Zapper 2009-06-09 16:17:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Nils Philippsen 2009-06-11 17:17:57 UTC
Similar here, only with uucico being run with cronjob_t instead of a type that has the necessary permissions (ausearch -i -sv no -ts 06/11/2009 19:12:30 -te 19:13:30):

----
type=SYSCALL msg=audit(06/11/2009 19:13:05.207:433) : arch=x86_64 syscall=open success=no exit=1657692120 a0=9bb5b0 a1=0 a2=1b6 a3=238 items=0 ppid=5024 pid=5042 auid=root uid=root gid=root euid=uucp suid=uucp fsuid=uucp egid=uucp sgid=uucp fsgid=uucp tty=(none) ses=20 comm=uucico exe=/usr/sbin/uucico subj=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(06/11/2009 19:13:05.207:433) : avc:  denied  { open } for  pid=5042 comm=uucico name=winz dev=dm-3 ino=360475 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:uucpd_spool_t:s0 tclass=file 
type=AVC msg=audit(06/11/2009 19:13:05.207:433) : avc:  denied  { read } for  pid=5042 comm=uucico name=winz dev=dm-3 ino=360475 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:uucpd_spool_t:s0 tclass=file 
----
type=SYSCALL msg=audit(06/11/2009 19:13:05.201:431) : arch=x86_64 syscall=creat success=no exit=1657692120 a0=9b9630 a1=1a4 a2=0 a3=7fffbaf82580 items=0 ppid=5024 pid=5042 auid=root uid=root gid=root euid=uucp suid=uucp fsuid=uucp egid=uucp sgid=uucp fsgid=uucp tty=(none) ses=20 comm=uucico exe=/usr/sbin/uucico subj=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(06/11/2009 19:13:05.201:431) : avc:  denied  { write open } for  pid=5042 comm=uucico name=TMP00000013b2 dev=dm-3 ino=720994 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:uucpd_lock_t:s0 tclass=file 
type=AVC msg=audit(06/11/2009 19:13:05.201:431) : avc:  denied  { create } for  pid=5042 comm=uucico name=TMP00000013b2 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:uucpd_lock_t:s0 tclass=file 
type=AVC msg=audit(06/11/2009 19:13:05.201:431) : avc:  denied  { add_name } for  pid=5042 comm=uucico name=TMP00000013b2 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:uucpd_lock_t:s0 tclass=dir

Comment 3 Dominick Grift 2009-08-23 19:42:01 UTC
been thinking about this and i think it actually makes sense to keep this behaviour. cron runs in its own environment , unlike at.

so if cron has its own environment, then why let it inherit the user domain privileges.

so in the future i will try at for stuff like backing up my home dir.

Comment 4 Dominick Grift 2009-08-23 20:42:49 UTC
forget what i said above, does not work.

Comment 5 Daniel Walsh 2009-08-24 13:22:31 UTC
I tend to agree.  I believe cronnie is supposed to start jobs as the user.  So the question is whether this is a cronnie bug or a policy bug.

Cron should start staff_t jobs as staff_t to make sure all transitions happen.

Comment 7 Bug Zapper 2010-04-27 14:27:03 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2010-06-28 12:38:54 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.