PATCH: Fix remote driver SSH tunnelling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



An off-by-one error in the remote driver checking for malloc() failure
in the SSH argv meant all SSH connections were always rejected. It was
always checking the trailing NULL in the argv[] 

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
Index: remote_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/remote_internal.c,v
retrieving revision 1.53
diff -u -r1.53 remote_internal.c
--- remote_internal.c	14 Jan 2008 04:05:23 -0000	1.53
+++ remote_internal.c	15 Jan 2008 00:25:18 -0000
@@ -670,11 +670,12 @@
         cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET);
         cmd_argv[j++] = 0;
         assert (j == nr_args);
-        for (j = 0; j < nr_args; j++)
+        for (j = 0; j < (nr_args-1); j++) {
             if (cmd_argv[j] == NULL) {
                 error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM));
                 goto failed;
             }
+        }
     }
 
         /*FALLTHROUGH*/
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]