From 4ac6ce38d3bc60f45491509ede4fc8437348048c Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 13 Aug 2015 07:35:10 +0200 Subject: [PATCH] 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 --- src/security/security_selinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 6e67a86cc2..a37f8c140b 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1740,7 +1740,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; } -- 2.47.2