[Pkg-libvirt-commits] [SCM] Libvirt debian packaging branch, master, updated. debian/0.5.1-5-7-g36efb6a

Guido Günther agx at sigxcpu.org
Mon Feb 16 21:34:00 UTC 2009


The following commit has been merged in the master branch:
commit b5180faf7c970fbf2a49538018576d353f6185ec
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Jan 30 22:08:48 2009 +0100

    Don't hardcode ssh port to 22
    
    based on a patch by Adrian Bridgett.
    Closes: #513605

diff --git a/debian/patches/0013-Don-t-hardcode-ssh-port.patch b/debian/patches/0013-Don-t-hardcode-ssh-port.patch
new file mode 100644
index 0000000..59e47cd
--- /dev/null
+++ b/debian/patches/0013-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 66de9d5..4eb0eb2 100644
+--- a/src/remote_internal.c
++++ b/src/remote_internal.c
+@@ -319,9 +319,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. */
+ 
+@@ -593,24 +590,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 a4eb81a..c036fc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@
 0010-raise-error-on-invalid-volume-format.patch
 0011-Fix-missing-read-only-access-checks-CVE-2008-5086.patch
 0012-don-t-fail-on-missing-locales.patch
+0013-Don-t-hardcode-ssh-port.patch

-- 
Libvirt debian packaging



More information about the Pkg-libvirt-commits mailing list