提交 7bebd888 编写于 作者: D Daniel P. Berrange

Revert "Change label of fusefs mounted at /proc/meminfo in lxc containers"

This reverts commit 940c6f10.
上级 a2619bb1
...@@ -52,10 +52,6 @@ ...@@ -52,10 +52,6 @@
# include <blkid/blkid.h> # include <blkid/blkid.h>
#endif #endif
#if WITH_SELINUX
# include <selinux/selinux.h>
#endif
#include "virerror.h" #include "virerror.h"
#include "virlog.h" #include "virlog.h"
#include "lxc_container.h" #include "lxc_container.h"
...@@ -769,26 +765,6 @@ static int lxcContainerMountProcFuse(virDomainDefPtr def, ...@@ -769,26 +765,6 @@ static int lxcContainerMountProcFuse(virDomainDefPtr def,
def->name)) < 0) def->name)) < 0)
return ret; return ret;
# if WITH_SELINUX
if (is_selinux_enabled() > 0) {
security_context_t scon;
ret = getfilecon("/proc/meminfo", &scon);
if (ret < 0) {
virReportSystemError(errno,
_("Failed to get security context of %s for /proc/meminfo mount point"),
meminfo_path);
return ret;
}
ret = setfilecon(meminfo_path, scon);
freecon(scon);
if (ret < 0) {
virReportSystemError(errno,
_("Failed to set security context of %s for /proc/meminfo mount point"),
meminfo_path);
return ret;
}
}
# endif
if ((ret = mount(meminfo_path, "/proc/meminfo", if ((ret = mount(meminfo_path, "/proc/meminfo",
NULL, MS_BIND, NULL)) < 0) { NULL, MS_BIND, NULL)) < 0) {
virReportSystemError(errno, virReportSystemError(errno,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册