]> xenbits.xensource.com Git - libvirt.git/commit
security_util: Remove stale XATTRs
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 8 Aug 2019 08:17:45 +0000 (10:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 22 Aug 2019 15:05:17 +0000 (17:05 +0200)
commit7cfb7aab573a031880a1f4fd20747843fea109ba
treed3c69870c77ecb5cdd4c9dc0c0a3dddeeb4e6ed5
parent8b802f13cb47817706cba101f5d52e2c8957698d
security_util: Remove stale XATTRs

It may happen that we leave some XATTRs behind. For instance, on
a sudden power loss, the host just shuts down without calling
restore on domain paths. This creates a problem, because when the
host starts up again, the XATTRs are there but they don't reflect
the true state and this may result in libvirt denying start of a
domain.

To solve this, save a unique timestamp (host boot time) among
with our XATTRs.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741140

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/security/security_util.c
tests/qemusecuritymock.c
tools/libvirt_recover_xattrs.sh