Merge lp:~dbarth/lightdm/vnc-no-password into lp:lightdm

Proposed by David Barth
Status: Rejected
Rejected by: Robert Ancell
Proposed branch: lp:~dbarth/lightdm/vnc-no-password
Merge into: lp:lightdm
Diff against target: 110 lines (+50/-0)
3 files modified
src/seat-xvnc.c (+14/-0)
src/xserver-xvnc.c (+32/-0)
src/xserver-xvnc.h (+4/-0)
To merge this branch: bzr merge lp:~dbarth/lightdm/vnc-no-password
Reviewer Review Type Date Requested Status
Robert Ancell Disapprove
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+123959@code.launchpad.net

Commit message

Add VNCServer options security-types and password-file

Description of the change

This patch makes it effectively possible to connect via VNC, either without a password (security-types: None) or with one stored in a known location, that can be administered via vncpasswd.

[VNCServer]
...
security-types: None or VncAuth (default)
password-file: /var/lib/lightdm/.vnc/passwd (for example)

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

You have tab characters here that should be 4 spaces instead.

review: Needs Fixing
lp:~dbarth/lightdm/vnc-no-password updated
1543. By David Barth

fix indentation

Revision history for this message
David Barth (dbarth) wrote :

Should be fixed now

Revision history for this message
David Barth (dbarth) wrote :

Ping? is this patch good for merging now? Let me know.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1543
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~dbarth/lightdm/vnc-no-password/+merge/123959/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/lightdm-ci/4/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/lightdm-quantal-amd64-ci/4/console

Click here to trigger a rebuild:
http://s-jenkins:8080/job/lightdm-ci/4/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1543
http://jenkins.qa.ubuntu.com/job/lightdm-ci/10/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/lightdm-raring-amd64-ci/4/console

Click here to trigger a rebuild:
http://s-jenkins:8080/job/lightdm-ci/10/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Sorry for the huge delay. As discussed in person I was a bit worried about how standard these options were between VNC servers, and being able to support all the options. I think the better solution is to be able to specify the whole Xvnc command line so you can set any options you require (like you can for the normal X server). I've done a proposal for that here:

https://code.launchpad.net/~robert-ancell/lightdm/xvnc-command/+merge/158520

review: Disapprove

Unmerged revisions

1543. By David Barth

fix indentation

1542. By David Barth

switch to defining 2 new options: security-types and password-file

1541. By David Barth

re-sync with trunk

1540. By David Barth

add VNCServer/no-password option to bypass the VNC auth step

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/seat-xvnc.c'
2--- src/seat-xvnc.c 2012-03-01 03:29:29 +0000
3+++ src/seat-xvnc.c 2012-09-20 09:57:19 +0000
4@@ -56,6 +56,20 @@
5 if (depth == 8 || depth == 16 || depth == 24 || depth == 32)
6 xserver_xvnc_set_depth (xserver, depth);
7 }
8+ if (config_has_key (config_get_instance (), "VNCServer", "password-file"))
9+ {
10+ gchar *file;
11+ file = config_get_string (config_get_instance (), "VNCServer", "password-file");
12+ xserver_xvnc_set_password_file (xserver, file);
13+ g_free (file);
14+ }
15+ if (config_has_key (config_get_instance (), "VNCServer", "security-types"))
16+ {
17+ gchar *types;
18+ types = config_get_string (config_get_instance (), "VNCServer", "security-types");
19+ xserver_xvnc_set_security_types (xserver, types);
20+ g_free (types);
21+ }
22
23 return DISPLAY_SERVER (xserver);
24 }
25
26=== modified file 'src/xserver-xvnc.c'
27--- src/xserver-xvnc.c 2012-03-20 05:47:56 +0000
28+++ src/xserver-xvnc.c 2012-09-20 09:57:19 +0000
29@@ -38,6 +38,12 @@
30 /* Geometry and colour depth */
31 gint width, height, depth;
32
33+ /* Password file for the VNC connection */
34+ gchar *password_file;
35+
36+ /* SecurityTypes: None or VncAuth by default */
37+ gchar *security_types;
38+
39 /* TRUE when received ready signal */
40 gboolean got_signal;
41 };
42@@ -88,6 +94,22 @@
43 server->priv->depth = depth;
44 }
45
46+void
47+xserver_xvnc_set_password_file (XServerXVNC *server, const gchar *file)
48+{
49+ g_return_if_fail (server != NULL);
50+ g_free (server->priv->password_file);
51+ server->priv->password_file = g_strdup (file);
52+}
53+
54+void
55+xserver_xvnc_set_security_types (XServerXVNC *server, const gchar *types)
56+{
57+ g_return_if_fail (server != NULL);
58+ g_free (server->priv->security_types);
59+ server->priv->security_types = g_strdup (types);
60+}
61+
62 gchar *
63 xserver_xvnc_get_authority_file_path (XServerXVNC *server)
64 {
65@@ -254,6 +276,10 @@
66 g_string_append_printf (command, " -auth %s", path);
67 g_free (path);
68 g_string_append (command, " -inetd -nolisten tcp");
69+ if (server->priv->password_file)
70+ g_string_append_printf (command, " -PasswordFile %s", server->priv->password_file);
71+ if (server->priv->security_types)
72+ g_string_append_printf (command, " -SecurityTypes %s", server->priv->security_types);
73 if (server->priv->width > 0 && server->priv->height > 0)
74 g_string_append_printf (command, " -geometry %dx%d", server->priv->width, server->priv->height);
75 if (server->priv->depth > 0)
76@@ -301,6 +327,8 @@
77 server->priv->width = 1024;
78 server->priv->height = 768;
79 server->priv->depth = 8;
80+ server->priv->password_file = NULL;
81+ server->priv->security_types = NULL;
82 }
83
84 static void
85@@ -315,6 +343,10 @@
86 if (self->priv->authority_file)
87 g_object_unref (self->priv->authority_file);
88 g_free (self->priv->log_file);
89+ if (self->priv->password_file)
90+ g_free (self->priv->password_file);
91+ if (self->priv->security_types)
92+ g_free (self->priv->security_types);
93
94 G_OBJECT_CLASS (xserver_xvnc_parent_class)->finalize (object);
95 }
96
97=== modified file 'src/xserver-xvnc.h'
98--- src/xserver-xvnc.h 2011-10-20 07:14:37 +0000
99+++ src/xserver-xvnc.h 2012-09-20 09:57:19 +0000
100@@ -49,6 +49,10 @@
101
102 void xserver_xvnc_set_depth (XServerXVNC *server, gint depth);
103
104+void xserver_xvnc_set_password_file (XServerXVNC *server, const gchar *file);
105+
106+void xserver_xvnc_set_security_types (XServerXVNC *server, const gchar *types);
107+
108 gchar *xserver_xvnc_get_authority_file_path (XServerXVNC *server);
109
110 G_END_DECLS

Subscribers

People subscribed via source and target branches