]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/remote_internal.c: Fix handling of usernames (thanks to
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 25 Sep 2007 13:54:17 +0000 (13:54 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 25 Sep 2007 13:54:17 +0000 (13:54 +0000)
        Fabian Deutsch for finding and fixing this).

ChangeLog
src/remote_internal.c

index 18efb21014649d33eaf9128a6310ddeb25612122..e6e339f989f08bbdc349bae38832bfd25863d388 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
index d567374d4b25433715111a47ba226676873c9394..4f7e6ba938d683c5d150fbc6e35099df195e8932 100644 (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,