[Pkg-libvirt-commits] [SCM] Libvirt debian packaging branch, experimental, updated. debian/0.5.1-4-4-gc2bc996

Guido Günther agx at sigxcpu.org
Fri Jan 30 22:23:46 UTC 2009


The following commit has been merged in the experimental branch:
commit cecac4c22d5cb8e559ed017c36d07d58a368786f
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Jan 30 22:36:31 2009 +0100

    [PATCH] Don't hardcode ssh port
    
    based on a patch by Adrian Bridgett.
    Closes: #513605

diff --git a/debian/patches/0008-Don-t-hardcode-ssh-port.patch b/debian/patches/0008-Don-t-hardcode-ssh-port.patch
new file mode 100644
index 0000000..274f935
--- /dev/null
+++ b/debian/patches/0008-Don-t-hardcode-ssh-port.patch
@@ -0,0 +1,58 @@
+From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 30 Jan 2009 22:01:15 +0100
+Subject: [PATCH] Don't hardcode ssh port
+
+based on a patch by Adrian Bridgett.
+
+Closes: #513605
+---
+ src/remote_internal.c |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/remote_internal.c b/src/remote_internal.c
+index 7bf8766..d2f4397 100644
+--- a/src/remote_internal.c
++++ b/src/remote_internal.c
+@@ -353,9 +353,6 @@ doRemoteOpen (virConnectPtr conn,
+     } else if (transport == trans_tcp) {
+         port = strdup (LIBVIRTD_TCP_PORT);
+         if (!port) goto out_of_memory;
+-    } else if (transport == trans_ssh) {
+-        port = strdup ("22");
+-        if (!port) goto out_of_memory;
+     } else
+         port = NULL;           /* Port not used for unix, ext. */
+ 
+@@ -644,24 +641,27 @@ doRemoteOpen (virConnectPtr conn,
+     }
+ 
+     case trans_ssh: {
+-        int j, nr_args = 8;
++        int j, nr_args = 6;
+ 
+         if (username) nr_args += 2; /* For -l username */
+         if (no_tty) nr_args += 5;   /* For -T -o BatchMode=yes -e none */
++        if (port) nr_args += 2;     /* For -p port */
+ 
+         command = command ? : strdup ("ssh");
+         if (command == NULL)
+             goto out_of_memory;
+ 
+         // Generate the final command argv[] array.
+-        //   ssh -p $port [-l $username] $hostname $netcat -U $sockname [NULL]
++        //   ssh [-p $port] [-l $username] $hostname $netcat -U $sockname [NULL]
+         if (VIR_ALLOC_N(cmd_argv, nr_args) < 0)
+             goto out_of_memory;
+ 
+         j = 0;
+         cmd_argv[j++] = strdup (command);
+-        cmd_argv[j++] = strdup ("-p");
+-        cmd_argv[j++] = strdup (port);
++        if (port) {
++            cmd_argv[j++] = strdup ("-p");
++            cmd_argv[j++] = strdup (port);
++        }
+         if (username) {
+             cmd_argv[j++] = strdup ("-l");
+             cmd_argv[j++] = strdup (username);
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index cf63a0f..ff360a9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0005-qemu-fix-parallel-serial-mode-tcp-and-unix.patch
 0006-Fix-missing-read-only-access-checks-CVE-2008-5086.patch
 0007-don-t-fail-on-missing-locales.patch
+0008-Don-t-hardcode-ssh-port.patch

-- 
Libvirt debian packaging



More information about the Pkg-libvirt-commits mailing list