From: sven.vermeulen@siphos.be (Sven Vermeulen) Date: Sat, 8 Dec 2012 21:57:00 +0100 Subject: [refpolicy] [PATCH 09/11] Add ~/.maildir as a valid maildir destination In-Reply-To: <1355000222-7297-1-git-send-email-sven.vermeulen@siphos.be> References: <1355000222-7297-1-git-send-email-sven.vermeulen@siphos.be> Message-ID: <1355000222-7297-10-git-send-email-sven.vermeulen@siphos.be> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com Signed-off-by: Sven Vermeulen --- mta.fc | 1 + mta.if | 1 + mta.te | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/mta.fc b/mta.fc index 4fed862..f42896c 100644 --- a/mta.fc +++ b/mta.fc @@ -3,6 +3,7 @@ HOME_DIR/\.forward[^/]* -- gen_context(system_u:object_r:mail_home_t,s0) HOME_DIR/dead\.letter -- gen_context(system_u:object_r:mail_home_t,s0) HOME_DIR/\.mailrc -- gen_context(system_u:object_r:mail_home_t,s0) HOME_DIR/Maildir(/.*)? gen_context(system_u:object_r:mail_home_rw_t,s0) +HOME_DIR/\.maildir(/.*)? gen_context(system_u:object_r:mail_home_rw_t,s0) /bin/mail(x)? -- gen_context(system_u:object_r:sendmail_exec_t,s0) diff --git a/mta.if b/mta.if index 99e64cd..ed81cac 100644 --- a/mta.if +++ b/mta.if @@ -105,6 +105,7 @@ interface(`mta_role',` allow $2 mail_home_rw_t:file { manage_file_perms relabel_file_perms }; allow $2 mail_home_rw_t:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms }; userdom_user_home_dir_filetrans($2, mail_home_rw_t, dir, "Maildir") + userdom_user_home_dir_filetrans($2, mail_home_rw_t, dir, ".maildir") allow $2 user_mail_tmp_t:dir { manage_dir_perms relabel_dir_perms }; allow $2 user_mail_tmp_t:file { manage_file_perms relabel_file_perms }; diff --git a/mta.te b/mta.te index f6b8c2d..fd5814e 100644 --- a/mta.te +++ b/mta.te @@ -344,6 +344,7 @@ userdom_user_home_dir_filetrans(mailserver_delivery, mail_home_t, file, ".forwar userdom_user_home_dir_filetrans(mailserver_delivery, mail_home_t, file, ".mailrc") userdom_user_home_dir_filetrans(mailserver_delivery, mail_home_t, file, "dead.letter") userdom_user_home_dir_filetrans(mailserver_delivery, mail_home_rw_t, dir, "Maildir") +userdom_user_home_dir_filetrans(mailserver_delivery, mail_home_rw_t, dir, ".maildir") read_files_pattern(mailserver_delivery, system_mail_tmp_t, system_mail_tmp_t) -- 1.7.8.6