]> xenbits.xensource.com Git - libvirt.git/commit
security: Always forget labels for TPM state directory
authorAndrea Bolognani <abologna@redhat.com>
Fri, 30 Aug 2024 12:25:25 +0000 (14:25 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 3 Oct 2024 11:29:56 +0000 (13:29 +0200)
commit8fe803247e908bf1e6cc155b6c4b3ac112dda50d
treeb68472597aedea6b20c1f8b7685cdd6b0981120f
parent3bfcb35dd58d2c5c935e20c482941256a6d05734
security: Always forget labels for TPM state directory

In the case of outgoing migration, we avoid restoring the
remembered labels for the TPM state directory because doing so
would risk cutting off storage access for the target node.

Even in that case though, we should still forget (unref) the
remembered labels: if we don't, the source node will keep
thinking that the state directory is in use.

Note that this change only affects the SELinux driver because
the DAC driver doesn't currently implement label remembering
for TPM state at all.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/security/security_selinux.c