Summary: SELinux is preventing /usr/sbin/postalias "write" access on /etc/postfix. Detailed Description: SELinux denied access requested by postalias. It is not expected that this access is required by postalias and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access. Allowing Access: You can generate a local policy module to allow this access - see FAQ (http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug report. Additional Information: Source Context unconfined_u:system_r:postfix_master_t:s0 Target Context system_u:object_r:postfix_etc_t:s0 Target Objects /etc/postfix [ dir ] Source postalias Source Path /usr/sbin/postalias Port <Unknown> Host (removed) Source RPM Packages postfix-2.7.0-1.fc13 Target RPM Packages postfix-2.7.0-1.fc13 Policy RPM selinux-policy-3.7.19-39.fc13 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name catchall Host Name (removed) Platform Linux (removed) 2.6.33.6-147.fc13.i686.PAE #1 SMP Tue Jul 6 22:24:44 UTC 2010 i686 i686 Alert Count 0 First Seen Mon 26 Jul 2010 12:51:51 AM MDT Last Seen Mon 26 Jul 2010 12:51:51 AM MDT Local ID 2acc7e8a-90cb-42ff-bc42-e01adf9c3f8d Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1280127111.537:27607): avc: denied { write } for pid=4585 comm="postalias" name="postfix" dev=dm-0 ino=27527158 scontext=unconfined_u:system_r:postfix_master_t:s0 tcontext=system_u:object_r:postfix_etc_t:s0 tclass=dir node=(removed) type=SYSCALL msg=audit(1280127111.537:27607): arch=40000003 syscall=5 success=no exit=-13 a0=12787b8 a1=80c2 a2=1a4 a3=1 items=0 ppid=4580 pid=4585 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="postalias" exe="/usr/sbin/postalias" subj=unconfined_u:system_r:postfix_master_t:s0 key=(null) Hash String generated from catchall,postalias,postfix_master_t,postfix_etc_t,dir,write audit2allow suggests: #============= postfix_master_t ============== #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following type: # postfix_spool_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t, etc_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t, etc_t, postfix_data_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t, etc_t, postfix_data_t, var_spool_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t, etc_t, postfix_data_t, var_spool_t, var_run_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t, etc_t, postfix_data_t, var_spool_t, var_run_t, postfix_spool_maildrop_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t, etc_t, postfix_data_t, var_spool_t, var_run_t, postfix_spool_maildrop_t, postfix_spool_bounce_t #!!!! The source type 'postfix_master_t' can write to a 'dir' of the following types: # postfix_spool_t, etc_aliases_t, postfix_private_t, mailman_data_t, postfix_spool_flush_t, postfix_public_t, etc_t, postfix_data_t, var_spool_t, var_run_t, postfix_spool_maildrop_t, postfix_spool_bounce_t, root_t allow postfix_master_t postfix_etc_t:dir write;
Any idea what file postalias is trying to write in /etc/postfix?
(In reply to comment #1) > Any idea what file postalias is trying to write in /etc/postfix? Yeah, postalias was trying to write /etc/postfix/aliases My postfix main.cf is configured to put the aliases file in /etc/postfix/aliases. alias_database = hash:/etc/postfix/aliases Looks like the fedora default is slightly different: alias_database = hash:/etc/aliases
The problem is the policy is not allowing it to create the file there. Miroslav lets add ######################################## ## <summary> ## Type transition files created in calling dir ## to the mail address aliases type. ## </summary> ## <param name="domain"> ## <summary> ## Domain allowed access. ## </summary> ## </param> ## <param name="domain"> ## <summary> ## Directory to transition on. ## </summary> ## </param> # interface(`mta_filetrans_aliases',` filetrans_pattern($1, $2, etc_aliases_t, file) ') mta_filetrans_aliases(postfix_master_t, postfix_etc_t)
I guess I got a couple of options then: a) move the alias file to the standard location b) write a local selinux policy to cover my custom configuration c) Disable SELinux entirely. Are you willing to support another alias file location in the selinux policy or is option a) the recommended solution?
We have some policy to handle the /etc/postfix location. The problem seems to be the policy only covers the case where the file was pre-existing. We will fix the policy but "a" would be a good option.
Fixed in selinux-policy-3.7.19-42.fc13.
selinux-policy-3.7.19-44.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-44.fc13
selinux-policy-3.7.19-44.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-44.fc13
selinux-policy-3.7.19-44.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.