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: Fri, 23 Nov 2012 21:02:23
Message-Id: 1353704451.d7bd32677c917e760f4df2bdbd0ebf6c3db633fa.SwifT@gentoo
1 commit: d7bd32677c917e760f4df2bdbd0ebf6c3db633fa
2 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
3 AuthorDate: Fri Nov 23 21:00:51 2012 +0000
4 Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
5 CommitDate: Fri Nov 23 21:00:51 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=d7bd3267
7
8 Update nginx to allow admins to run nginx
9
10 Allow administrators to run nginx directly, to support testing alternative
11 configurations and enabled modules information.
12
13 Also, remove the gentoo_ prefix for the booleans. It is not in line with the
14 other booleans.
15
16 ---
17 policy/modules/contrib/nginx.if | 3 +++
18 policy/modules/contrib/nginx.te | 12 ++++++------
19 2 files changed, 9 insertions(+), 6 deletions(-)
20
21 diff --git a/policy/modules/contrib/nginx.if b/policy/modules/contrib/nginx.if
22 index 8b41b37..6fa607a 100644
23 --- a/policy/modules/contrib/nginx.if
24 +++ b/policy/modules/contrib/nginx.if
25 @@ -82,6 +82,7 @@ interface(`nginx_domtrans',`
26 interface(`nginx_admin',`
27 gen_require(`
28 type nginx_t, nginx_conf_t, nginx_log_t, nginx_var_lib_t, nginx_var_run_t;
29 + type nginx_exec_t;
30 ')
31
32 allow $1 nginx_t:process { ptrace signal_perms };
33 @@ -90,6 +91,8 @@ interface(`nginx_admin',`
34 files_list_etc($1)
35 admin_pattern($1, nginx_conf_t)
36
37 + can_exec($1, nginx_exec_t)
38 +
39 files_list_var_lib($1)
40 admin_pattern($1, nginx_var_lib_t)
41
42
43 diff --git a/policy/modules/contrib/nginx.te b/policy/modules/contrib/nginx.te
44 index 0e55911..93894ac 100644
45 --- a/policy/modules/contrib/nginx.te
46 +++ b/policy/modules/contrib/nginx.te
47 @@ -11,42 +11,42 @@ policy_module(nginx,1.0.10)
48 ## Allow nginx to serve HTTP content (act as an http server)
49 ## </p>
50 ## </desc>
51 -gen_tunable(gentoo_nginx_enable_http_server, false)
52 +gen_tunable(nginx_enable_http_server, false)
53
54 ## <desc>
55 ## <p>
56 ## Allow nginx to act as an imap proxy server)
57 ## </p>
58 ## </desc>
59 -gen_tunable(gentoo_nginx_enable_imap_server, false)
60 +gen_tunable(nginx_enable_imap_server, false)
61
62 ## <desc>
63 ## <p>
64 ## Allow nginx to act as a pop3 server)
65 ## </p>
66 ## </desc>
67 -gen_tunable(gentoo_nginx_enable_pop3_server, false)
68 +gen_tunable(nginx_enable_pop3_server, false)
69
70 ## <desc>
71 ## <p>
72 ## Allow nginx to act as an smtp server)
73 ## </p>
74 ## </desc>
75 -gen_tunable(gentoo_nginx_enable_smtp_server, false)
76 +gen_tunable(nginx_enable_smtp_server, false)
77
78 ## <desc>
79 ## <p>
80 ## Allow nginx to connect to remote HTTP servers
81 ## </p>
82 ## </desc>
83 -gen_tunable(gentoo_nginx_can_network_connect_http, false)
84 +gen_tunable(nginx_can_network_connect_http, false)
85
86 ## <desc>
87 ## <p>
88 ## Allow nginx to connect to remote servers (regardless of protocol)
89 ## </p>
90 ## </desc>
91 -gen_tunable(gentoo_nginx_can_network_connect, false)
92 +gen_tunable(nginx_can_network_connect, false)
93
94 type nginx_t;
95 type nginx_exec_t;