1virsh_selinux(8)             SELinux Policy virsh             virsh_selinux(8)
2
3
4

NAME

6       virsh_selinux - Security Enhanced Linux Policy for the virsh processes
7

DESCRIPTION

9       Security-Enhanced Linux secures the virsh processes via flexible manda‐
10       tory access control.
11
12       The virsh processes execute with the  virsh_t  SELinux  type.  You  can
13       check  if  you have these processes running by executing the ps command
14       with the -Z qualifier.
15
16       For example:
17
18       ps -eZ | grep virsh_t
19
20
21

ENTRYPOINTS

23       The virsh_t SELinux type can be entered via the virsh_exec_t file type.
24
25       The default entrypoint paths for the virsh_t domain are the following:
26
27       /usr/sbin/xl, /usr/sbin/xm, /usr/bin/virsh
28

PROCESS TYPES

30       SELinux defines process types (domains) for each process running on the
31       system
32
33       You can see the context of a process using the -Z option to ps
34
35       Policy  governs  the  access confined processes have to files.  SELinux
36       virsh policy is very flexible allowing users to setup their virsh  pro‐
37       cesses in as secure a method as possible.
38
39       The following process types are defined for virsh:
40
41       virsh_t, virsh_ssh_t
42
43       Note:  semanage  permissive  -a virsh_t can be used to make the process
44       type virsh_t permissive. SELinux does not  deny  access  to  permissive
45       process  types, but the AVC (SELinux denials) messages are still gener‐
46       ated.
47
48

BOOLEANS

50       SELinux policy is customizable based on least access  required.   virsh
51       policy is extremely flexible and has several booleans that allow you to
52       manipulate the policy and run virsh with the tightest access possible.
53
54
55
56       If you want to allow all domains to execute in fips_mode, you must turn
57       on the fips_mode boolean. Enabled by default.
58
59       setsebool -P fips_mode 1
60
61
62
63       If  you  want to allow confined applications to use nscd shared memory,
64       you must turn on the nscd_use_shm boolean. Enabled by default.
65
66       setsebool -P nscd_use_shm 1
67
68
69
70       If you want to allow confined virtual guests to manage nfs  files,  you
71       must turn on the virt_use_nfs boolean. Disabled by default.
72
73       setsebool -P virt_use_nfs 1
74
75
76
77       If  you want to allow confined virtual guests to manage cifs files, you
78       must turn on the virt_use_samba boolean. Disabled by default.
79
80       setsebool -P virt_use_samba 1
81
82
83

MANAGED FILES

85       The SELinux process type virsh_t can manage files labeled with the fol‐
86       lowing  file  types.   The paths listed are the default paths for these
87       file types.  Note the processes UID still need to have DAC permissions.
88
89       cifs_t
90
91
92       container_file_t
93
94            /var/lib/rkt/cas(/.*)?
95
96       nfs_t
97
98
99       ssh_home_t
100
101            /var/lib/[^/]+/.ssh(/.*)?
102            /root/.ssh(/.*)?
103            /var/lib/one/.ssh(/.*)?
104            /var/lib/pgsql/.ssh(/.*)?
105            /var/lib/openshift/[^/]+/.ssh(/.*)?
106            /var/lib/amanda/.ssh(/.*)?
107            /var/lib/stickshift/[^/]+/.ssh(/.*)?
108            /var/lib/gitolite/.ssh(/.*)?
109            /var/lib/nocpulse/.ssh(/.*)?
110            /var/lib/gitolite3/.ssh(/.*)?
111            /var/lib/openshift/gear/[^/]+/.ssh(/.*)?
112            /root/.shosts
113            /home/[^/]+/.ssh(/.*)?
114            /home/[^/]+/.ansible/cp/.*
115            /home/[^/]+/.shosts
116
117       systemd_passwd_var_run_t
118
119            /var/run/systemd/ask-password(/.*)?
120            /var/run/systemd/ask-password-block(/.*)?
121
122       vhostmd_tmpfs_t
123
124
125       virt_etc_rw_t
126
127            /etc/xen/.*/.*
128            /etc/xen/[^/]*
129            /etc/libvirt/.*/.*
130            /etc/libvirt/[^/]*
131
132       virt_etc_t
133
134            /etc/xen/[^/]*
135            /etc/libvirt/[^/]*
136            /etc/xen
137            /etc/libvirt
138
139       virt_image_type
140
141            all virtual image files
142
143       virt_lock_t
144
145
146       virt_lxc_var_run_t
147
148            /var/run/libvirt/lxc(/.*)?
149            /var/run/libvirt-sandbox(/.*)?
150
151       xenfs_t
152
153
154

FILE CONTEXTS

156       SELinux requires files to have an extended attribute to define the file
157       type.
158
159       You can see the context of a file using the -Z option to ls
160
161       Policy  governs  the  access  confined  processes  have to these files.
162       SELinux virsh policy is very flexible allowing  users  to  setup  their
163       virsh processes in as secure a method as possible.
164
165       The following file types are defined for virsh:
166
167
168
169       virsh_exec_t
170
171       -  Set  files  with the virsh_exec_t type, if you want to transition an
172       executable to the virsh_t domain.
173
174
175       Paths:
176            /usr/sbin/xl, /usr/sbin/xm, /usr/bin/virsh
177
178
179       Note: File context can be temporarily modified with the chcon  command.
180       If  you want to permanently change the file context you need to use the
181       semanage fcontext command.  This will modify the SELinux labeling data‐
182       base.  You will need to use restorecon to apply the labels.
183
184

COMMANDS

186       semanage  fcontext  can also be used to manipulate default file context
187       mappings.
188
189       semanage permissive can also be used to manipulate  whether  or  not  a
190       process type is permissive.
191
192       semanage  module can also be used to enable/disable/install/remove pol‐
193       icy modules.
194
195       semanage boolean can also be used to manipulate the booleans
196
197
198       system-config-selinux is a GUI tool available to customize SELinux pol‐
199       icy settings.
200
201

AUTHOR

203       This manual page was auto-generated using sepolicy manpage .
204
205

SEE ALSO

207       selinux(8),  virsh(8),  semanage(8),  restorecon(8),  chcon(1),  sepol‐
208       icy(8), setsebool(8), virsh_ssh_selinux(8), virsh_ssh_selinux(8)
209
210
211
212virsh                              23-02-03                   virsh_selinux(8)
Impressum