mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
security_selinux: Use proper structure to access socket data
In virSecuritySELinuxSetSecurityChardevLabel() we are labelling unix
socket path, but accessing another structure of the union. This does
not pose a problem currently as both paths are at the same offset, but
this should be fixed for the future.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 4ac6ce38d3)
This commit is contained in:
1 parent
9a7a699896
commit
6fb8fbad9f
1 file changed
+1
-1
@@ -1743,7 +1743,7 @@ virSecuritySELinuxSetSecurityChardevLabel(virDomainDefPtr def,
|
||||
|
||||
case VIR_DOMAIN_CHR_TYPE_UNIX:
|
||||
if (!dev_source->data.nix.listen) {
|
||||
if (virSecuritySELinuxSetFilecon(dev_source->data.file.path,
|
||||
if (virSecuritySELinuxSetFilecon(dev_source->data.nix.path,
|
||||
imagelabel) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user