blob: 220c75e10720bdbed08d3c1579a4e5b7d9d7b0a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
=============
munin_selinux
=============
-------------------------------
SELinux policy module for Munin
-------------------------------
:Author: Sven Vermeulen <swift@gentoo.org>
:Date: 2014-11-11
:Manual section: 8
:Manual group: SELinux
DESCRIPTION
===========
The *munin* SELinux module supports the Munin networked resource management
tool.
DOMAINS
=======
The following is a list of munin related domains.
munin_t
is the main domain for the munin daemon
'*'_munin_plugin_t
is a set of domains related to the munin plugins
LOCATIONS
=========
The following list of locations identify file resources that are used by the
munin domains. They are by default allocated towards the default locations for
munin, so if you use a different location, you will need to properly address
this. You can do so through ``semanage``, like so::
semanage fcontext -a -t system_cron_spool_t "/usr/local/share/munin/plugins(/.*)?"
The above example marks the */usr/local/share/munin/plugins* location as the location where
munin plugin executables are stored.
FUNCTIONAL
----------
munin_etc_t
is used for the munin configuration files
EXECUTABLES
-----------
munin_exec_t
is used for the munin binaries
munin_initrc_exec_t
is used for the munin init script
'*'_munin_plugin_exec_t
is used for the munin plugin executables
DAEMON FILES
------------
munin_log_t
is used for the munin logs
munin_plugin_state_t
is used for the munin plugin state information
munin_var_lib_t
is used for the variable information used by munin
munin_var_run_t
is used for the variable runtime state information of munin
POLICY
======
The following interfaces can be used to enhance the default policy with
munin-related provileges. More details on these interfaces can be found in the
interface HTML documentation, we will not list all available interfaces here.
Plugin template
---------------
With the ``munin_plugin_template`` interface, additional munin plugin domains
can be created. The interface takes a single prefix (like "disk") and will create
the proper types and privileges, including (using "disk" as the example):
* *disk_munin_plugin_t* as plugin domain
* *disk_munin_plugin_exec_t* as plugin executable type
* *disk_munin_plugin_tmp_t* as plugin temporary file type
To enable it::
munin_plugin_template(disk)
Administrative role
-------------------
The ``munin_admin`` interface grants a user role and type administrative access
to the munin types::
munin_admin(myuser_t, myuser_r)
BUGS
====
Munin
-----
The ``net-analyzer/munin`` package deploys the munin cronjobs as end user
cronjobs inside ``/var/spool/cron/crontabs``. The munin cronjobs are meant to
be executed as the munin Linux account, but the jobs themselves are best seen
as system cronjobs (as they are not related to a true interactive end user).
The default deployed files might not get the *system_u* SELinux ownership
assigned. To fix this, execute the following command::
~# chcon -u system_u /var/spool/cron/crontabs/munin
For more information, see bug #526532.
SEE ALSO
========
* Gentoo and SELinux at https://wiki.gentoo.org/wiki/SELinux
* Gentoo Hardened SELinux Project at
https://wiki.gentoo.org/wiki/Project:Hardened
|