Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/
Date: Sun, 11 Nov 2018 23:29:47
Message-Id: 1541978251.ab0f433384c8a532bcb8a75dac6117c2590403a6.perfinion@gentoo
1 commit: ab0f433384c8a532bcb8a75dac6117c2590403a6
2 Author: David Sugar <dsugar <AT> tresys <DOT> com>
3 AuthorDate: Fri Nov 2 00:40:57 2018 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 11 23:17:31 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=ab0f4333
7
8 Add interfaces to control clamav_unit_t systemd services
9
10 Signed-off-by: Dave Sugar <dsugar <AT> tresys.com>
11 Signed-off-by: Jason Zaman <jason <AT> perfinion.com>
12
13 policy/modules/services/clamav.if | 76 +++++++++++++++++++++++++++++++++++++++
14 1 file changed, 76 insertions(+)
15
16 diff --git a/policy/modules/services/clamav.if b/policy/modules/services/clamav.if
17 index d1296fcc..2adb1230 100644
18 --- a/policy/modules/services/clamav.if
19 +++ b/policy/modules/services/clamav.if
20 @@ -223,6 +223,82 @@ interface(`clamav_scannable_files',`
21 typeattribute $1 clam_scannable_type;
22 ')
23
24 +########################################
25 +## <summary>
26 +## Allow specified domain to enable clamd units
27 +## </summary>
28 +## <param name="domain">
29 +## <summary>
30 +## Domain allowed access.
31 +## </summary>
32 +## </param>
33 +#
34 +interface(`clamav_enabledisable_clamd',`
35 + gen_require(`
36 + type clamav_unit_t;
37 + class service { enable disable };
38 + ')
39 +
40 + allow $1 clamav_unit_t:service { enable disable };
41 +')
42 +
43 +########################################
44 +## <summary>
45 +## Allow specified domain to start clamd units
46 +## </summary>
47 +## <param name="domain">
48 +## <summary>
49 +## Domain allowed access.
50 +## </summary>
51 +## </param>
52 +#
53 +interface(`clamav_startstop_clamd',`
54 + gen_require(`
55 + type clamd_unit_t;
56 + class service { start stop };
57 + ')
58 +
59 + allow $1 clamd_unit_t:service { start stop };
60 +')
61 +
62 +########################################
63 +## <summary>
64 +## Allow specified domain to get status of clamd
65 +## </summary>
66 +## <param name="domain">
67 +## <summary>
68 +## Domain allowed access.
69 +## </summary>
70 +## </param>
71 +#
72 +interface(`clamav_status_clamd',`
73 + gen_require(`
74 + type clamd_unit_t;
75 + class service status;
76 + ')
77 +
78 + allow $1 clamd_unit_t:service status;
79 +')
80 +
81 +########################################
82 +## <summary>
83 +## Allow specified domain reload of clamd
84 +## </summary>
85 +## <param name="domain">
86 +## <summary>
87 +## Domain allowed access.
88 +## </summary>
89 +## </param>
90 +#
91 +interface(`clamav_reload_clamd',`
92 + gen_require(`
93 + type clamd_unit_t;
94 + class service reload;
95 + ')
96 +
97 + allow $1 clamd_unit_t:service reload;
98 +')
99 +
100 ########################################
101 ## <summary>
102 ## All of the rules required to