Bug 509644 - spamassassin is started in wrong domain
spamassassin is started in wrong domain
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-04 09:45 EDT by Vadym Chepkov
Modified: 2010-06-28 09:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 09:29:00 EDT
Type: ---
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 Vadym Chepkov 2009-07-04 09:45:08 EDT
selinux-policy-targeted-3.6.12-53.fc11.noarch

spamassassin is starting in initrc domain

This is due to the fact that in Fedora distribution startup script is

/etc/rc\.d/init\.d/spamassassin

not

/etc/rc\.d/init\.d/spamd 

as in the policy

But even after I did chcon on the file it still runs in initrc domain

I noticed 
/usr/bin/spamd                                     regular file       system_u:object_r:spamassassin_exec_t:s0 

shouldn't it be spamd_exec_t ?
Comment 1 Daniel Walsh 2009-07-06 14:20:32 EDT
If you chcon -t spamd_exec_t  /usr/bin/spamd

does it work properly.

Looks like the labeling of spamd in /usr/sbin/spamd is spamd_exec_t,  But I think users can run this command?
Comment 2 Vadym Chepkov 2009-07-06 15:43:21 EDT
I did this

# chcon -t spamd_initrc_exec_t /etc/rc.d/init.d/spamassassin 
# chcon -t spamd_exec_t /usr/bin/spamd

It seems running in a proper context now.

unconfined_u:system_r:spamd_t:s0 root    21894     1  0 15:09 ?        00:00:06 /usr/bin/spamd -d -c -m9 -H -r /var/run/spamd.pid                    
unconfined_u:system_r:spamd_t:s0 root    21906 21894  0 15:09 ?        00:00:09 spamd child                                                          
unconfined_u:system_r:spamd_t:s0 root    21907 21894  0 15:09 ?        00:00:00 spamd child                                    

and I don't see any issues or denials

users suppose to run spamassassin or spamc, but not spamd directly to answer your question.
Comment 3 Daniel Walsh 2009-07-06 16:06:00 EDT
Miroslav, can you fix the labeling.
Comment 4 Miroslav Grepl 2009-07-07 04:34:35 EDT
Fixed in selinux-policy-3.6.12-64.fc11
Comment 5 Vadym Chepkov 2009-07-08 18:52:01 EDT
It seems cron is a big enemy nowadays.

This is something that I was using forever in my crontab:

*/10 * * * * root /usr/local/sbin/spamd.watch && /sbin/service spamassassin condrestart

Now it generates avc instead of sending me e-mails like it was in the past, when spamassassin was restarted.

type=AVC msg=audit(1247092566.601:26391): avc:  denied  { write } for  pid=30477 comm="spamassassin" path="pipe:[1707936]" dev=pipefs ino=1707936 scontext=system_u:system_r:system_cronjob_t:s0 tcontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tclass=fifo_file
type=AVC msg=audit(1247092566.601:26391): avc:  denied  { write } for  pid=30477 comm="spamassassin" path="pipe:[1707936]" dev=pipefs ino=1707936 scontext=system_u:system_r:system_cronjob_t:s0 tcontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tclass=fifo_file

type=AVC msg=audit(1247092571.521:26392): avc:  denied  { ioctl } for  pid=30501 comm="spamd" path="pipe:[1707935]" dev=pipefs ino=1707935 scontext=system_u:system_r:spamd_t:s0 tcontext=system_u:system_r:crond_t:s0-s0:c0.c1023 tclass=fifo_file
Comment 6 Bug Zapper 2010-04-27 11:29:21 EDT
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 7 Bug Zapper 2010-06-28 09:29:00 EDT
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.

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