提交 9c4f62ae 编写于 作者: S Soren Hansen 提交者: Eric Blake

Use global directory as UML's monitorDir for privileged connections

For privileged UML connections (uml:///system), we shouldn't use root's
home dir, but rather somewhere in /var/run/libvirt/uml-guest.

https://bugzilla.redhat.com/show_bug.cgi?id=499536Signed-off-by: NSoren Hansen <soren@linux2go.dk>
上级 0a58eed3
...@@ -373,6 +373,10 @@ umlStartup(int privileged) { ...@@ -373,6 +373,10 @@ umlStartup(int privileged) {
if ((base = strdup (SYSCONF_DIR "/libvirt")) == NULL) if ((base = strdup (SYSCONF_DIR "/libvirt")) == NULL)
goto out_of_memory; goto out_of_memory;
if (virAsprintf(&uml_driver->monitorDir,
"%s/run/libvirt/uml-guest", LOCAL_STATE_DIR) == -1)
goto out_of_memory;
} else { } else {
if (virAsprintf(&uml_driver->logDir, if (virAsprintf(&uml_driver->logDir,
...@@ -381,11 +385,11 @@ umlStartup(int privileged) { ...@@ -381,11 +385,11 @@ umlStartup(int privileged) {
if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) if (virAsprintf(&base, "%s/.libvirt", userdir) == -1)
goto out_of_memory; goto out_of_memory;
}
if (virAsprintf(&uml_driver->monitorDir, if (virAsprintf(&uml_driver->monitorDir,
"%s/.uml", userdir) == -1) "%s/.uml", userdir) == -1)
goto out_of_memory; goto out_of_memory;
}
/* Configuration paths are either ~/.libvirt/uml/... (session) or /* Configuration paths are either ~/.libvirt/uml/... (session) or
* /etc/libvirt/uml/... (system). * /etc/libvirt/uml/... (system).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册