diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index a2ae59904c..5ca960f13e 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -745,6 +745,9 @@ static int virLXCControllerSetupServer(virLXCControllerPtr ctrl) ctrl))) goto error; + if (virSecurityManagerSetSocketLabel(ctrl->securityManager, ctrl->def) < 0) + goto error; + if (!(svc = virNetServerServiceNewUNIX(sockpath, 0700, 0, @@ -757,6 +760,9 @@ static int virLXCControllerSetupServer(virLXCControllerPtr ctrl) 5))) goto error; + if (virSecurityManagerClearSocketLabel(ctrl->securityManager, ctrl->def) < 0) + goto error; + if (virNetServerAddService(ctrl->server, svc, NULL) < 0) goto error; virObjectUnref(svc);