1 |
commit: 8bb830ebcda2c6a348d661d97487822cc6d1310c |
2 |
Author: Dominick Grift <dominick.grift <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Oct 30 10:09:00 2012 +0000 |
4 |
Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
5 |
CommitDate: Tue Oct 30 18:33:00 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=8bb830eb |
7 |
|
8 |
Changes to the tzdata policy module |
9 |
|
10 |
Role attribute |
11 |
|
12 |
Signed-off-by: Dominick Grift <dominick.grift <AT> gmail.com> |
13 |
|
14 |
--- |
15 |
policy/modules/contrib/tzdata.if | 16 +++++++++------- |
16 |
policy/modules/contrib/tzdata.te | 10 ++++++---- |
17 |
2 files changed, 15 insertions(+), 11 deletions(-) |
18 |
|
19 |
diff --git a/policy/modules/contrib/tzdata.if b/policy/modules/contrib/tzdata.if |
20 |
index 01c6c86..53ecd0d 100644 |
21 |
--- a/policy/modules/contrib/tzdata.if |
22 |
+++ b/policy/modules/contrib/tzdata.if |
23 |
@@ -1,13 +1,13 @@ |
24 |
-## <summary>Time zone updater</summary> |
25 |
+## <summary>Time zone updater.</summary> |
26 |
|
27 |
######################################## |
28 |
## <summary> |
29 |
## Execute a domain transition to run tzdata. |
30 |
## </summary> |
31 |
## <param name="domain"> |
32 |
-## <summary> |
33 |
+## <summary> |
34 |
## Domain allowed to transition. |
35 |
-## </summary> |
36 |
+## </summary> |
37 |
## </param> |
38 |
# |
39 |
interface(`tzdata_domtrans',` |
40 |
@@ -21,7 +21,9 @@ interface(`tzdata_domtrans',` |
41 |
|
42 |
######################################## |
43 |
## <summary> |
44 |
-## Execute the tzdata program in the tzdata domain. |
45 |
+## Execute tzdata in the tzdata domain, |
46 |
+## and allow the specified role |
47 |
+## the tzdata domain. |
48 |
## </summary> |
49 |
## <param name="domain"> |
50 |
## <summary> |
51 |
@@ -30,16 +32,16 @@ interface(`tzdata_domtrans',` |
52 |
## </param> |
53 |
## <param name="role"> |
54 |
## <summary> |
55 |
-## The role to allow the tzdata domain. |
56 |
+## Role allowed access. |
57 |
## </summary> |
58 |
## </param> |
59 |
## <rolecap/> |
60 |
# |
61 |
interface(`tzdata_run',` |
62 |
gen_require(` |
63 |
- type tzdata_t; |
64 |
+ attribute_role tzdata_roles; |
65 |
') |
66 |
|
67 |
tzdata_domtrans($1) |
68 |
- role $2 types tzdata_t; |
69 |
+ roleattribute $2 tzdata_roles; |
70 |
') |
71 |
|
72 |
diff --git a/policy/modules/contrib/tzdata.te b/policy/modules/contrib/tzdata.te |
73 |
index d0f2a64..aa6ae96 100644 |
74 |
--- a/policy/modules/contrib/tzdata.te |
75 |
+++ b/policy/modules/contrib/tzdata.te |
76 |
@@ -1,21 +1,24 @@ |
77 |
-policy_module(tzdata, 1.4.0) |
78 |
+policy_module(tzdata, 1.4.1) |
79 |
|
80 |
######################################## |
81 |
# |
82 |
# Declarations |
83 |
# |
84 |
|
85 |
+attribute_role tzdata_roles; |
86 |
+ |
87 |
type tzdata_t; |
88 |
type tzdata_exec_t; |
89 |
init_daemon_domain(tzdata_t, tzdata_exec_t) |
90 |
application_domain(tzdata_t, tzdata_exec_t) |
91 |
+role tzdata_roles types tzdata_t; |
92 |
|
93 |
######################################## |
94 |
# |
95 |
-# tzdata local policy |
96 |
+# Local policy |
97 |
# |
98 |
|
99 |
-files_read_etc_files(tzdata_t) |
100 |
+files_read_config_files(tzdata_t) |
101 |
files_search_spool(tzdata_t) |
102 |
|
103 |
fs_getattr_xattr_fs(tzdata_t) |
104 |
@@ -30,7 +33,6 @@ miscfiles_etc_filetrans_localization(tzdata_t) |
105 |
|
106 |
userdom_use_user_terminals(tzdata_t) |
107 |
|
108 |
-# tzdata looks for /var/spool/postfix/etc/localtime. |
109 |
optional_policy(` |
110 |
postfix_search_spool(tzdata_t) |
111 |
') |