mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
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
This commit is contained in:
parent
de4950b200
commit
aac6018a35
@ -1,3 +1,8 @@
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user