提交 aac6018a 编写于 作者: D Daniel Veillard

fix missing authentication on virsh shell commands

* src/virsh.c: fix missing authentication when command are issued
  from the shell, patch by Matthias Bolte
Daniel
上级 de4950b2
Mon Mar 23 17:33:17 CET 2009 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: fix missing authentication when command are issued
from the shell, patch by Matthias Bolte
Fri Mar 20 21:43:57 CET 2009 Daniel Veillard <veillard@redhat.com>
* src/util.c: flag unused parameters, by Maximilian Wilhelm
......
......@@ -468,13 +468,14 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
ctl->name = vshStrdup(ctl, vshCommandOptString(cmd, "name", NULL));
if (!ro) {
ctl->conn = virConnectOpen(ctl->name);
ctl->readonly = 0;
} else {
ctl->conn = virConnectOpenReadOnly(ctl->name);
ctl->readonly = 1;
}
ctl->conn = virConnectOpenAuth(ctl->name, virConnectAuthPtrDefault,
ctl->readonly ? VIR_CONNECT_RO : 0);
if (!ctl->conn)
vshError(ctl, FALSE, "%s", _("Failed to connect to the hypervisor"));
......@@ -2315,7 +2316,7 @@ cmdMigrate (vshControl *ctl, const vshCmd *cmd)
flags |= VIR_MIGRATE_LIVE;
/* Temporarily connect to the destination host. */
dconn = virConnectOpen (desturi);
dconn = virConnectOpenAuth (desturi, virConnectAuthPtrDefault, 0);
if (!dconn) goto done;
/* Migrate. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册