Codebase list virt-viewer / 2376c06
New patch 0001-Don-t-hardcode-sshport.patch Don't hardcode sshport. This unbreaks using different ports via .ssh/config. Guido G√ľnther 11 years ago
2 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
1 Date: Sat, 23 Jul 2011 18:01:29 +0200
2 Subject: Don't hardcode sshport
3
4 this unbreaks using different ports via .ssh/config
5 ---
6 src/virt-viewer.c | 12 +++++-------
7 1 files changed, 5 insertions(+), 7 deletions(-)
8
9 diff --git a/src/virt-viewer.c b/src/virt-viewer.c
10 index 5321580..9622446 100644
11 --- a/src/virt-viewer.c
12 +++ b/src/virt-viewer.c
13 @@ -896,14 +896,12 @@ virt_viewer_open_tunnel_ssh(const char *sshhost,
14 char portstr[50];
15 int n = 0;
16
17 - if (!sshport)
18 - sshport = 22;
19 -
20 - sprintf(portstr, "%d", sshport);
21 -
22 cmd[n++] = "ssh";
23 - cmd[n++] = "-p";
24 - cmd[n++] = portstr;
25 + if (!sshport) {
26 + cmd[n++] = "-p";
27 + sprintf(portstr, "%d", sshport);
28 + cmd[n++] = portstr;
29 + }
30 if (sshuser) {
31 cmd[n++] = "-l";
32 cmd[n++] = sshuser;
33 --
0 0001-Don-t-hardcode-sshport.patch