diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index a2ae59904c80dfb1821dd6cbff890c31a1f4b06e..5ca960f13e53501315b28f9086eaa389475b8feb 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);