]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security_dac: Remember old labels
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 6 Aug 2018 10:14:52 +0000 (12:14 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 19 Dec 2018 14:32:17 +0000 (15:32 +0100)
commit1845d3ad5d0053044323a37941a5ac61759ff656
tree97df57857f9fddbc373ebf5d7893cd815fce0116
parentfa808763b29f4038960fd0a6b745ba2516f4cb3c
security_dac: Remember old labels

This also requires the same DAC label to be used for shared
paths. If a path is already in use by a domain (or domains) then
and the domain we are starting now wants to access the path it
has to have the same DAC label. This might look too restrictive
as the new label can still guarantee access to already running
domains but in reality it is very unlikely and usually an admin
mistake.

This requirement also simplifies seclabel remembering, because we
can store only one seclabel and have a refcounter for how many
times the path is in use. If we were to allow different labels
and store them in some sort of array the algorithm to match
labels to domains would be needlessly complicated.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/security/security_dac.c