1drbd_selinux(8) SELinux Policy drbd drbd_selinux(8)
2
3
4
6 drbd_selinux - Security Enhanced Linux Policy for the drbd processes
7
9 Security-Enhanced Linux secures the drbd processes via flexible manda‐
10 tory access control.
11
12 The drbd processes execute with the drbd_t SELinux type. You can check
13 if you have these processes running by executing the ps command with
14 the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep drbd_t
19
20
21
23 The drbd_t SELinux type can be entered via the drbd_exec_t file type.
24
25 The default entrypoint paths for the drbd_t domain are the following:
26
27 /sbin/drbdadm, /sbin/drbdsetup, /usr/sbin/drbdadm, /usr/sbin/drbdsetup,
28 /usr/lib/ocf/resource.d/linbit/drbd
29
31 SELinux defines process types (domains) for each process running on the
32 system
33
34 You can see the context of a process using the -Z option to ps
35
36 Policy governs the access confined processes have to files. SELinux
37 drbd policy is very flexible allowing users to setup their drbd pro‐
38 cesses in as secure a method as possible.
39
40 The following process types are defined for drbd:
41
42 drbd_t
43
44 Note: semanage permissive -a drbd_t can be used to make the process
45 type drbd_t permissive. SELinux does not deny access to permissive
46 process types, but the AVC (SELinux denials) messages are still gener‐
47 ated.
48
49
51 SELinux policy is customizable based on least access required. drbd
52 policy is extremely flexible and has several booleans that allow you to
53 manipulate the policy and run drbd with the tightest access possible.
54
55
56
57 If you want to allow users to resolve user passwd entries directly from
58 ldap rather then using a sssd server, you must turn on the authlo‐
59 gin_nsswitch_use_ldap boolean. Disabled by default.
60
61 setsebool -P authlogin_nsswitch_use_ldap 1
62
63
64
65 If you want to allow all domains to execute in fips_mode, you must turn
66 on the fips_mode boolean. Enabled by default.
67
68 setsebool -P fips_mode 1
69
70
71
72 If you want to allow confined applications to run with kerberos, you
73 must turn on the kerberos_enabled boolean. Enabled by default.
74
75 setsebool -P kerberos_enabled 1
76
77
78
79 If you want to allow system to run with NIS, you must turn on the
80 nis_enabled boolean. Disabled by default.
81
82 setsebool -P nis_enabled 1
83
84
85
86 If you want to allow confined applications to use nscd shared memory,
87 you must turn on the nscd_use_shm boolean. Disabled by default.
88
89 setsebool -P nscd_use_shm 1
90
91
92
93 If you want to disable kernel module loading, you must turn on the
94 secure_mode_insmod boolean. Enabled by default.
95
96 setsebool -P secure_mode_insmod 1
97
98
99
101 The SELinux process type drbd_t can manage files labeled with the fol‐
102 lowing file types. The paths listed are the default paths for these
103 file types. Note the processes UID still need to have DAC permissions.
104
105 cluster_conf_t
106
107 /etc/cluster(/.*)?
108
109 cluster_tmpfs_t
110
111
112 cluster_var_lib_t
113
114 /var/lib/pcsd(/.*)?
115 /var/lib/cluster(/.*)?
116 /var/lib/openais(/.*)?
117 /var/lib/pengine(/.*)?
118 /var/lib/corosync(/.*)?
119 /usr/lib/heartbeat(/.*)?
120 /var/lib/heartbeat(/.*)?
121 /var/lib/pacemaker(/.*)?
122
123 cluster_var_run_t
124
125 /var/run/crm(/.*)?
126 /var/run/cman_.*
127 /var/run/rsctmp(/.*)?
128 /var/run/aisexec.*
129 /var/run/heartbeat(/.*)?
130 /var/run/corosync-qnetd(/.*)?
131 /var/run/corosync-qdevice(/.*)?
132 /var/run/corosync.pid
133 /var/run/cpglockd.pid
134 /var/run/rgmanager.pid
135 /var/run/cluster/rgmanager.sk
136
137 drbd_lock_t
138
139 /var/lock/subsys/drbd
140
141 drbd_tmp_t
142
143
144 drbd_var_lib_t
145
146 /var/lib/drbd(/.*)?
147
148 drbd_var_run_t
149
150 /var/run/drbd(/.*)?
151
152 root_t
153
154 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
155 /
156 /initrd
157
158
160 SELinux requires files to have an extended attribute to define the file
161 type.
162
163 You can see the context of a file using the -Z option to ls
164
165 Policy governs the access confined processes have to these files.
166 SELinux drbd policy is very flexible allowing users to setup their drbd
167 processes in as secure a method as possible.
168
169 STANDARD FILE CONTEXT
170
171 SELinux defines the file context types for the drbd, if you wanted to
172 store files with these types in a diffent paths, you need to execute
173 the semanage command to sepecify alternate labeling and then use
174 restorecon to put the labels on disk.
175
176 semanage fcontext -a -t drbd_tmp_t '/srv/mydrbd_content(/.*)?'
177 restorecon -R -v /srv/mydrbd_content
178
179 Note: SELinux often uses regular expressions to specify labels that
180 match multiple files.
181
182 The following file types are defined for drbd:
183
184
185
186 drbd_exec_t
187
188 - Set files with the drbd_exec_t type, if you want to transition an
189 executable to the drbd_t domain.
190
191
192 Paths:
193 /sbin/drbdadm, /sbin/drbdsetup, /usr/sbin/drbdadm, /usr/sbin/drbd‐
194 setup, /usr/lib/ocf/resource.d/linbit/drbd
195
196
197 drbd_initrc_exec_t
198
199 - Set files with the drbd_initrc_exec_t type, if you want to transition
200 an executable to the drbd_initrc_t domain.
201
202
203
204 drbd_lock_t
205
206 - Set files with the drbd_lock_t type, if you want to treat the files
207 as drbd lock data, stored under the /var/lock directory
208
209
210
211 drbd_tmp_t
212
213 - Set files with the drbd_tmp_t type, if you want to store drbd tempo‐
214 rary files in the /tmp directories.
215
216
217
218 drbd_var_lib_t
219
220 - Set files with the drbd_var_lib_t type, if you want to store the drbd
221 files under the /var/lib directory.
222
223
224
225 drbd_var_run_t
226
227 - Set files with the drbd_var_run_t type, if you want to store the drbd
228 files under the /run or /var/run directory.
229
230
231
232 Note: File context can be temporarily modified with the chcon command.
233 If you want to permanently change the file context you need to use the
234 semanage fcontext command. This will modify the SELinux labeling data‐
235 base. You will need to use restorecon to apply the labels.
236
237
239 semanage fcontext can also be used to manipulate default file context
240 mappings.
241
242 semanage permissive can also be used to manipulate whether or not a
243 process type is permissive.
244
245 semanage module can also be used to enable/disable/install/remove pol‐
246 icy modules.
247
248 semanage boolean can also be used to manipulate the booleans
249
250
251 system-config-selinux is a GUI tool available to customize SELinux pol‐
252 icy settings.
253
254
256 This manual page was auto-generated using sepolicy manpage .
257
258
260 selinux(8), drbd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
261 setsebool(8)
262
263
264
265drbd 19-06-18 drbd_selinux(8)