diff --git a/ChangeLog b/ChangeLog index 18efb21014..e6e339f989 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Sep 25 14:45:00 BST 2007 Richard W.M. Jones + + * 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 * src/qemu_conf.c, src/qemu_conf.h: Detect QEMU flags per-VM, diff --git a/src/remote_internal.c b/src/remote_internal.c index d567374d4b..4f7e6ba938 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -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,