* src/remote_internal.c: Fix handling of usernames (thanks to

Fabian Deutsch for finding and fixing this).
This commit is contained in:
Richard W.M. Jones 2007-09-25 13:54:17 +00:00
parent 136ebc6e3c
commit 91076f111b
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Tue Sep 25 14:45:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Fix handling of usernames (thanks to
Fabian Deutsch for finding and fixing this).
Fri Sep 21 17:14:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_conf.c, src/qemu_conf.h: Detect QEMU flags per-VM,

View File

@ -315,13 +315,14 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
} else if (transport == trans_ssh) {
port = strdup ("22");
if (!port) goto out_of_memory;
if (uri->user) {
username = strdup (uri->user);
if (!username) goto out_of_memory;
}
} else
port = NULL; /* Port not used for unix, ext. */
if (uri->user) {
username = strdup (uri->user);
if (!username) goto out_of_memory;
}
/* Get the variables from the query string.
* Then we need to reconstruct the query string (because
* feasibly it might contain variables needed by the real driver,