Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65010 - default sec-policy/selinux-postfix doesn't allow sysadm_r run /usr/sbin/postconf
Summary: default sec-policy/selinux-postfix doesn't allow sysadm_r run /usr/sbin/postconf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: petre rodan (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-22 13:00 UTC by Tuan Van (RETIRED)
Modified: 2004-10-16 08:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tuan Van (RETIRED) gentoo-dev 2004-09-22 13:00:50 UTC
there are time you need to run 'postconf' to check postfix configuration. with the default sec-policy/selinux-postfix, I'll get denied:

Sep 19 13:14:43 nebula audit(1095624883.519:0): avc:  denied  { execute } for  pid=27695 exe=/bin/bash name=postconf dev=sda3 ino=673978 scontext=tvan:sysadm_r:sysadm_t tcontext=system_u:object_r:postfix_master_exec_t tclass=file
Sep 19 13:14:43 nebula audit(1095624883.519:0): avc:  denied  { read } for  pid=27695 exe=/bin/bash name=postconf dev=sda3 ino=673978 scontext=tvan:sysadm_r:sysadm_t tcontext=system_u:object_r:postfix_master_exec_t tclass=file

my workaround atm is to add:
allow sysadm_t postfix_master_exec_t:file { execute execute_no_trans getattr read };
in domain/program/my.te

I am just a selinux newbie so I don't know if the above line will made my system less secure. Please advise.
Comment 1 Chris PeBenito (RETIRED) gentoo-dev 2004-10-01 10:09:09 UTC
this is probably ok.  we'll have to check for updates upstream
Comment 2 petre rodan (RETIRED) gentoo-dev 2004-10-04 04:07:44 UTC
if this postconf binary is only used by sysadm_t to check the active configuration, we could also label it bin_t. in this case there is no need to change the policy.

can you please tell me if this binary is ever used for anything else than just verification of the configuration parameters?
Comment 3 Tuan Van (RETIRED) gentoo-dev 2004-10-04 09:15:02 UTC
Petre,
postconf, and postmap need to be labeled "postfix_master_exec_t" but sysadm_r should be able to run them also.
Comment 4 petre rodan (RETIRED) gentoo-dev 2004-10-15 09:58:26 UTC
I got a response from upstream,
http://marc.theaimsgroup.com/?l=selinux&m=109748288127771&w=2

please be so kind and see if the merged version works on your system (I'm not used to this MTA):
http://dev.gentoo.org/~kaiowas/distfiles/selinux-postfix-20041015.tar.bz2
if you have any problems with this version I would be happy to send your comments upstream.

if you want to see a diff between the gentoo policy and the merged one, here it is:
http://dev.gentoo.org/~kaiowas/patches/selinux-postfix.diff

bye,
peter
Comment 5 petre rodan (RETIRED) gentoo-dev 2004-10-16 08:13:10 UTC
in CVS