1systemd_logind_selinux(8)SELinux Policy systemd_logindsystemd_logind_selinux(8)
2
3
4
6 systemd_logind_selinux - Security Enhanced Linux Policy for the sys‐
7 temd_logind processes
8
10 Security-Enhanced Linux secures the systemd_logind processes via flexi‐
11 ble mandatory access control.
12
13 The systemd_logind processes execute with the systemd_logind_t SELinux
14 type. You can check if you have these processes running by executing
15 the ps command with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep systemd_logind_t
20
21
22
24 The systemd_logind_t SELinux type can be entered via the sys‐
25 temd_logind_exec_t file type.
26
27 The default entrypoint paths for the systemd_logind_t domain are the
28 following:
29
30 /usr/lib/systemd/systemd-logind, /usr/lib/systemd/systemd-user-runtime-
31 dir
32
34 SELinux defines process types (domains) for each process running on the
35 system
36
37 You can see the context of a process using the -Z option to ps
38
39 Policy governs the access confined processes have to files. SELinux
40 systemd_logind policy is very flexible allowing users to setup their
41 systemd_logind processes in as secure a method as possible.
42
43 The following process types are defined for systemd_logind:
44
45 systemd_logind_t
46
47 Note: semanage permissive -a systemd_logind_t can be used to make the
48 process type systemd_logind_t permissive. SELinux does not deny access
49 to permissive process types, but the AVC (SELinux denials) messages are
50 still generated.
51
52
54 SELinux policy is customizable based on least access required. sys‐
55 temd_logind policy is extremely flexible and has several booleans that
56 allow you to manipulate the policy and run systemd_logind with the
57 tightest access possible.
58
59
60
61 If you want to allow all domains to execute in fips_mode, you must turn
62 on the fips_mode boolean. Enabled by default.
63
64 setsebool -P fips_mode 1
65
66
67
68 If you want to allow nagios/nrpe to call sudo from NRPE utils scripts,
69 you must turn on the nagios_run_sudo boolean. Disabled by default.
70
71 setsebool -P nagios_run_sudo 1
72
73
74
75 If you want to allow system to run with NIS, you must turn on the
76 nis_enabled boolean. Disabled by default.
77
78 setsebool -P nis_enabled 1
79
80
81
82 If you want to allow Zabbix to run su/sudo, you must turn on the zab‐
83 bix_run_sudo boolean. Disabled by default.
84
85 setsebool -P zabbix_run_sudo 1
86
87
88
89 If you want to allow ZoneMinder to run su/sudo, you must turn on the
90 zoneminder_run_sudo boolean. Disabled by default.
91
92 setsebool -P zoneminder_run_sudo 1
93
94
95
97 The SELinux process type systemd_logind_t can manage files labeled with
98 the following file types. The paths listed are the default paths for
99 these file types. Note the processes UID still need to have DAC per‐
100 missions.
101
102 cgroup_t
103
104 /sys/fs/cgroup
105
106 cluster_conf_t
107
108 /etc/cluster(/.*)?
109
110 cluster_var_lib_t
111
112 /var/lib/pcsd(/.*)?
113 /var/lib/cluster(/.*)?
114 /var/lib/openais(/.*)?
115 /var/lib/pengine(/.*)?
116 /var/lib/corosync(/.*)?
117 /usr/lib/heartbeat(/.*)?
118 /var/lib/heartbeat(/.*)?
119 /var/lib/pacemaker(/.*)?
120
121 cluster_var_run_t
122
123 /var/run/crm(/.*)?
124 /var/run/cman_.*
125 /var/run/rsctmp(/.*)?
126 /var/run/aisexec.*
127 /var/run/heartbeat(/.*)?
128 /var/run/corosync-qnetd(/.*)?
129 /var/run/corosync-qdevice(/.*)?
130 /var/run/corosync.pid
131 /var/run/cpglockd.pid
132 /var/run/rgmanager.pid
133 /var/run/cluster/rgmanager.sk
134
135 config_home_t
136
137 /root/.kde(/.*)?
138 /root/.xine(/.*)?
139 /root/.config(/.*)?
140 /var/run/user/[^/]*/dconf(/.*)?
141 /root/.Xdefaults
142 /home/[^/]+/.kde(/.*)?
143 /home/[^/]+/.xine(/.*)?
144 /home/[^/]+/.config(/.*)?
145 /home/[^/]+/.cache/dconf(/.*)?
146 /home/[^/]+/.Xdefaults
147
148 fusefs_t
149
150 /var/run/user/[^/]*/gvfs
151
152 kdbusfs_t
153
154
155 root_t
156
157 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
158 /
159 /initrd
160
161 sysfs_t
162
163 /sys(/.*)?
164
165 systemd_logind_inhibit_var_run_t
166
167 /var/run/systemd/inhibit(/.*)?
168
169 systemd_logind_sessions_t
170
171 /var/run/systemd/sessions(/.*)?
172
173 systemd_logind_var_lib_t
174
175 /var/lib/systemd/linger(/.*)?
176
177 systemd_logind_var_run_t
178
179 /var/run/.*nologin.*
180 /var/run/systemd/seats(/.*)?
181 /var/run/systemd/users(/.*)?
182 /var/run/systemd/shutdown(/.*)?
183
184 systemd_passwd_var_run_t
185
186 /var/run/systemd/ask-password(/.*)?
187 /var/run/systemd/ask-password-block(/.*)?
188
189 udev_rules_t
190
191 /etc/udev/rules.d(/.*)?
192
193 var_auth_t
194
195 /var/ace(/.*)?
196 /var/rsa(/.*)?
197 /var/lib/abl(/.*)?
198 /var/lib/rsa(/.*)?
199 /var/lib/pam_ssh(/.*)?
200 /var/lib/pam_shield(/.*)?
201 /var/opt/quest/vas/vasd(/.*)?
202 /var/lib/google-authenticator(/.*)?
203
204
206 SELinux requires files to have an extended attribute to define the file
207 type.
208
209 You can see the context of a file using the -Z option to ls
210
211 Policy governs the access confined processes have to these files.
212 SELinux systemd_logind policy is very flexible allowing users to setup
213 their systemd_logind processes in as secure a method as possible.
214
215 STANDARD FILE CONTEXT
216
217 SELinux defines the file context types for the systemd_logind, if you
218 wanted to store files with these types in a diffent paths, you need to
219 execute the semanage command to sepecify alternate labeling and then
220 use restorecon to put the labels on disk.
221
222 semanage fcontext -a -t systemd_logind_inhibit_var_run_t '/srv/mysys‐
223 temd_logind_content(/.*)?'
224 restorecon -R -v /srv/mysystemd_logind_content
225
226 Note: SELinux often uses regular expressions to specify labels that
227 match multiple files.
228
229 The following file types are defined for systemd_logind:
230
231
232
233 systemd_logind_exec_t
234
235 - Set files with the systemd_logind_exec_t type, if you want to transi‐
236 tion an executable to the systemd_logind_t domain.
237
238
239 Paths:
240 /usr/lib/systemd/systemd-logind, /usr/lib/systemd/systemd-user-
241 runtime-dir
242
243
244 systemd_logind_inhibit_var_run_t
245
246 - Set files with the systemd_logind_inhibit_var_run_t type, if you want
247 to store the systemd logind inhibit files under the /run or /var/run
248 directory.
249
250
251
252 systemd_logind_sessions_t
253
254 - Set files with the systemd_logind_sessions_t type, if you want to
255 treat the files as systemd logind sessions data.
256
257
258
259 systemd_logind_var_lib_t
260
261 - Set files with the systemd_logind_var_lib_t type, if you want to
262 store the systemd logind files under the /var/lib directory.
263
264
265
266 systemd_logind_var_run_t
267
268 - Set files with the systemd_logind_var_run_t type, if you want to
269 store the systemd logind files under the /run or /var/run directory.
270
271
272 Paths:
273 /var/run/.*nologin.*, /var/run/systemd/seats(/.*)?, /var/run/sys‐
274 temd/users(/.*)?, /var/run/systemd/shutdown(/.*)?
275
276
277 Note: File context can be temporarily modified with the chcon command.
278 If you want to permanently change the file context you need to use the
279 semanage fcontext command. This will modify the SELinux labeling data‐
280 base. You will need to use restorecon to apply the labels.
281
282
284 semanage fcontext can also be used to manipulate default file context
285 mappings.
286
287 semanage permissive can also be used to manipulate whether or not a
288 process type is permissive.
289
290 semanage module can also be used to enable/disable/install/remove pol‐
291 icy modules.
292
293 semanage boolean can also be used to manipulate the booleans
294
295
296 system-config-selinux is a GUI tool available to customize SELinux pol‐
297 icy settings.
298
299
301 This manual page was auto-generated using sepolicy manpage .
302
303
305 selinux(8), systemd_logind(8), semanage(8), restorecon(8), chcon(1),
306 sepolicy(8), setsebool(8)
307
308
309
310systemd_logind 20-05-05 systemd_logind_selinux(8)