1 |
commit: b3afcd57276f8844ab25af288948cca8c543abfa |
2 |
Author: Kenton Groombridge <me <AT> concord <DOT> sh> |
3 |
AuthorDate: Tue Feb 2 16:34:44 2021 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 6 21:15:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b3afcd57 |
7 |
|
8 |
dovecot, postfix: add missing accesses |
9 |
|
10 |
postfix_pipe_t requires reading dovecot configuration and connecting to |
11 |
dovecot stream sockets if configured to use dovecot for local mail |
12 |
delivery. |
13 |
|
14 |
Signed-off-by: Kenton Groombridge <me <AT> concord.sh> |
15 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
16 |
|
17 |
policy/modules/services/dovecot.if | 22 ++++++++++++++++++++++ |
18 |
policy/modules/services/postfix.te | 2 ++ |
19 |
2 files changed, 24 insertions(+) |
20 |
|
21 |
diff --git a/policy/modules/services/dovecot.if b/policy/modules/services/dovecot.if |
22 |
index 1aa28f47..ec66a893 100644 |
23 |
--- a/policy/modules/services/dovecot.if |
24 |
+++ b/policy/modules/services/dovecot.if |
25 |
@@ -61,6 +61,28 @@ interface(`dovecot_domtrans_deliver',` |
26 |
domtrans_pattern($1, dovecot_deliver_exec_t, dovecot_deliver_t) |
27 |
') |
28 |
|
29 |
+######################################## |
30 |
+## <summary> |
31 |
+## Read dovecot configuration content. |
32 |
+## </summary> |
33 |
+## <param name="domain"> |
34 |
+## <summary> |
35 |
+## Domain allowed access. |
36 |
+## </summary> |
37 |
+## </param> |
38 |
+## <rolecap/> |
39 |
+# |
40 |
+interface(`dovecot_read_config',` |
41 |
+ gen_require(` |
42 |
+ type dovecot_etc_t; |
43 |
+ ') |
44 |
+ |
45 |
+ files_search_etc($1) |
46 |
+ allow $1 dovecot_etc_t:dir list_dir_perms; |
47 |
+ allow $1 dovecot_etc_t:file read_file_perms; |
48 |
+ allow $1 dovecot_etc_t:lnk_file read_lnk_file_perms; |
49 |
+') |
50 |
+ |
51 |
######################################## |
52 |
## <summary> |
53 |
## Create, read, write, and delete |
54 |
|
55 |
diff --git a/policy/modules/services/postfix.te b/policy/modules/services/postfix.te |
56 |
index 5e25fa75..05c0b4a5 100644 |
57 |
--- a/policy/modules/services/postfix.te |
58 |
+++ b/policy/modules/services/postfix.te |
59 |
@@ -596,6 +596,8 @@ corecmd_exec_bin(postfix_pipe_t) |
60 |
|
61 |
optional_policy(` |
62 |
dovecot_domtrans_deliver(postfix_pipe_t) |
63 |
+ dovecot_read_config(postfix_pipe_t) |
64 |
+ dovecot_stream_connect(postfix_pipe_t) |
65 |
') |
66 |
|
67 |
optional_policy(` |