Gentoo Archives: gentoo-commits

From: Sven Vermeulen <sven.vermeulen@××××××.be>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/
Date: Wed, 31 Oct 2012 18:11:07
Message-Id: 1351706812.5f8d22db7ef4a072822a205c43978cb59ce7f1c0.SwifT@gentoo
1 commit: 5f8d22db7ef4a072822a205c43978cb59ce7f1c0
2 Author: Dominick Grift <dominick.grift <AT> gmail <DOT> com>
3 AuthorDate: Wed Oct 31 15:48:43 2012 +0000
4 Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
5 CommitDate: Wed Oct 31 18:06:52 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=5f8d22db
7
8 Move man cache file type to miscfiles
9
10 Signed-off-by: Dominick Grift <dominick.grift <AT> gmail.com>
11
12 ---
13 policy/modules/contrib/mandb.fc | 3 ---
14 policy/modules/contrib/mandb.if | 38 ++++++--------------------------------
15 policy/modules/contrib/mandb.te | 12 ++++--------
16 3 files changed, 10 insertions(+), 43 deletions(-)
17
18 diff --git a/policy/modules/contrib/mandb.fc b/policy/modules/contrib/mandb.fc
19 index e4864f3..2de0f64 100644
20 --- a/policy/modules/contrib/mandb.fc
21 +++ b/policy/modules/contrib/mandb.fc
22 @@ -1,4 +1 @@
23 /etc/cron.daily/man-db\.cron -- gen_context(system_u:object_r:mandb_exec_t,s0)
24 -
25 -# file context conflict with spec in miscfiles. remove comment when the spec in miscfiles is removed
26 -# /var/cache/man(/.*)? gen_context(system_u:object_r:mandb_cache_t,s0)
27
28 diff --git a/policy/modules/contrib/mandb.if b/policy/modules/contrib/mandb.if
29 index 35988b0..327f3f7 100644
30 --- a/policy/modules/contrib/mandb.if
31 +++ b/policy/modules/contrib/mandb.if
32 @@ -57,12 +57,7 @@ interface(`mandb_run',`
33 ## </param>
34 #
35 interface(`mandb_search_cache',`
36 - gen_require(`
37 - type mandb_cache_t;
38 - ')
39 -
40 - files_search_var($1)
41 - allow $1 mandb_cache_t:dir search_dir_perms;
42 + refpolicywarn(`$0($*) has been deprecated')
43 ')
44
45 ########################################
46 @@ -76,14 +71,7 @@ interface(`mandb_search_cache',`
47 ## </param>
48 #
49 interface(`mandb_delete_cache_content',`
50 - gen_require(`
51 - type mandb_cache_t;
52 - ')
53 -
54 - files_search_var($1)
55 - allow $1 mandb_cache_t:dir delete_dir_perms;
56 - allow $1 mandb_cache_t:file delete_file_perms;
57 - allow $1 mandb_cache_t:lnk_file delete_lnk_file_perms;
58 + refpolicywarn(`$0($*) has been deprecated')
59 ')
60
61 ########################################
62 @@ -97,14 +85,7 @@ interface(`mandb_delete_cache_content',`
63 ## </param>
64 #
65 interface(`mandb_read_cache_content',`
66 - gen_require(`
67 - type mandb_cache_t;
68 - ')
69 -
70 - files_search_var($1)
71 - allow $1 mandb_cache_t:dir list_dir_perms;
72 - allow $1 mandb_cache_t:file read_file_perms;
73 - allow $1 mandb_cache_t:lnk_file read_lnk_file_perms;
74 + refpolicywarn(`$0($*) has been deprecated')
75 ')
76
77 ########################################
78 @@ -119,14 +100,7 @@ interface(`mandb_read_cache_content',`
79 ## </param>
80 #
81 interface(`mandb_manage_cache_content',`
82 - gen_require(`
83 - type mandb_cache_t;
84 - ')
85 -
86 - files_search_var($1)
87 - allow $1 mandb_cache_t:dir manage_dir_perms;
88 - allow $1 mandb_cache_t:file manage_file_perms;
89 - allow $1 mandb_cache_t:lnk_file manage_lnk_file_perms;
90 + refpolicywarn(`$0($*) has been deprecated')
91 ')
92
93 ########################################
94 @@ -156,6 +130,6 @@ interface(`mandb_admin',`
95
96 mandb_run($1, $2)
97
98 - files_search_var($1)
99 - admin_pattern($1, mandb_cache_t)
100 + # pending
101 + # miscfiles_manage_man_cache_content(mandb_t)
102 ')
103
104 diff --git a/policy/modules/contrib/mandb.te b/policy/modules/contrib/mandb.te
105 index 8db8613..9430797 100644
106 --- a/policy/modules/contrib/mandb.te
107 +++ b/policy/modules/contrib/mandb.te
108 @@ -1,4 +1,4 @@
109 -policy_module(mandb, 1.0.1)
110 +policy_module(mandb, 1.0.2)
111
112 ########################################
113 #
114 @@ -13,9 +13,6 @@ type mandb_exec_t;
115 application_domain(mandb_t, mandb_exec_t)
116 role mandb_roles types mandb_t;
117
118 -type mandb_cache_t;
119 -files_type(mandb_cache_t)
120 -
121 ########################################
122 #
123 # Local policy
124 @@ -25,10 +22,6 @@ allow mandb_t self:process signal;
125 allow mandb_t self:fifo_file rw_fifo_file_perms;
126 allow mandb_t self:unix_stream_socket create_stream_socket_perms;
127
128 -manage_dirs_pattern(mandb_t, mandb_cache_t, mandb_cache_t)
129 -manage_files_pattern(mandb_t, mandb_cache_t, mandb_cache_t)
130 -manage_lnk_files_pattern(mandb_t, mandb_cache_t, mandb_cache_t)
131 -
132 kernel_read_system_state(mandb_t)
133
134 corecmd_exec_bin(mandb_t)
135 @@ -37,6 +30,9 @@ domain_use_interactive_fds(mandb_t)
136
137 files_read_etc_files(mandb_t)
138
139 +# pending
140 +# miscfiles_manage_man_cache_content(mandb_t)
141 +
142 optional_policy(`
143 cron_system_entry(mandb_t, mandb_exec_t)
144 ')