]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security_dac: Allow selective remember/recall for chardevs
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 1 Oct 2019 09:02:36 +0000 (11:02 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 11 Oct 2019 15:05:41 +0000 (17:05 +0200)
commit2b44cf8c327a4795c5d64b74dea2f7f8216e281d
tree7c70c65ea38bfd9f7bb5717a636d537737fb53ae
parent1a84a1ced16c168a8a6e1d44dde2b4b007ac5fe9
security_dac: Allow selective remember/recall for chardevs

While in most cases we want to remember/recall label for a
chardev, there are some special ones (like /dev/tpm0) where we
don't want to remember the seclabel nor recall it. See next
commit for rationale behind.

While the easiest way to implement this would be to just add new
argument to virSecurityDACSetChardevLabel() this one is also a
callback for virSecurityManagerSetChardevLabel() and thus has
more or less stable set of arguments. Therefore, the current
virSecurityDACSetChardevLabel() is renamed to
virSecurityDACSetChardevLabelHelper() and the original function
is set to call the new one.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/security/security_dac.c