]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
selinux: Match remember/recall arguments for SavedStateLabel
authorCole Robinson <crobinso@redhat.com>
Tue, 11 Nov 2025 14:10:03 +0000 (09:10 -0500)
committerCole Robinson <crobinso@redhat.com>
Fri, 14 Nov 2025 00:26:18 +0000 (19:26 -0500)
virSecuritySELinuxSetSavedStateLabel uses remember=false, but
virSecuritySELinuxRestoreSavedStateLabel uses recall=true.

This doesn't cause problems in practice, just some redundant xattr
calls. But Set and Restore calls should be matched here.

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

index fa5d1568ebd1a07514fbef4e7eed80a5772874c2..19e550460c1ed43769b2d7dd42ea39de8a87baa6 100644 (file)
@@ -2631,7 +2631,7 @@ virSecuritySELinuxRestoreSavedStateLabel(virSecurityManager *mgr,
     if (!secdef || !secdef->relabel)
         return 0;
 
-    return virSecuritySELinuxRestoreFileLabel(mgr, savefile, true);
+    return virSecuritySELinuxRestoreFileLabel(mgr, savefile, false);
 }