[Pkg-libvirt-commits] [SCM] Virt Manager packaging branch, master, updated. debian/0.6.0-6-1-g31465dc

Guido Guenther agx at sigxcpu.org
Fri Dec 12 22:50:45 UTC 2008


The following commit has been merged in the master branch:
commit 31465dca63305a2fce4b880f1149fed88a71a6bb
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Dec 12 23:42:35 2008 +0100

    allow non root users for ssh connections
    
    Closes: #505936

diff --git a/debian/patches/0009-allow-non-root-users-for-ssh-connections.patch b/debian/patches/0009-allow-non-root-users-for-ssh-connections.patch
new file mode 100644
index 0000000..9e2ca30
--- /dev/null
+++ b/debian/patches/0009-allow-non-root-users-for-ssh-connections.patch
@@ -0,0 +1,49 @@
+From 0d49c956e6c5e0a3b5965b8dd4f70d3e8629a634 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Thu, 4 Dec 2008 20:36:27 +0100
+Subject: [PATCH] allow non root users for ssh connections
+
+by specifying user at host in the "Add connection..." dialog. Default to
+root if no name was given.
+---
+ src/virtManager/connect.py |   10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/virtManager/connect.py b/src/virtManager/connect.py
+index dcb9278..33a173b 100644
+--- a/src/virtManager/connect.py
++++ b/src/virtManager/connect.py
+@@ -217,6 +217,11 @@ class vmmConnect(gobject.GObject):
+             auto = self.window.get_widget("autoconnect").get_active()
+         uri = None
+ 
++        if conn == CONN_SSH and '@' in host:
++            user, host = host.split('@',1)
++        else:
++            user = "root"
++
+         readOnly = None
+         if hv == -1:
+             pass
+@@ -226,7 +231,8 @@ class vmmConnect(gobject.GObject):
+             elif conn == CONN_TLS:
+                 uri = "xen+tls://" + host + "/"
+             elif conn == CONN_SSH:
+-                uri = "xen+ssh://root@" + host + "/"
++
++                uri = "xen+ssh://" + user + "@" + host + "/"
+             elif conn == CONN_TCP:
+                 uri = "xen+tcp://" + host + "/"
+         else:
+@@ -235,7 +241,7 @@ class vmmConnect(gobject.GObject):
+             elif conn == CONN_TLS:
+                 uri = "qemu+tls://" + host + "/system"
+             elif conn == CONN_SSH:
+-                uri = "qemu+ssh://root@" + host + "/system"
++                uri = "qemu+ssh://" + user + "@" + host + "/system"
+             elif conn == CONN_TCP:
+                 uri = "qemu+tcp://" + host + "/system"
+ 
+-- 
+1.6.0.3
+
diff --git a/debian/patches/series b/debian/patches/series
index 6e0dcaf..53e245f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
 0006-fix-sorting-exceptions.patch
 0007-populate-hostinfo-earlier-in-tick-function-so-it-isn.patch
 0008-qemu-session-can-t-write-to-the-pool-so-use-curren.patch
+0009-allow-non-root-users-for-ssh-connections.patch

-- 
Virt Manager packaging



More information about the Pkg-libvirt-commits mailing list