Merge ~liushuyu-011/ubuntu/+source/vinagre:merge-lp2065216 into ubuntu/+source/vinagre:debian/sid
- Git
- lp:~liushuyu-011/ubuntu/+source/vinagre
- merge-lp2065216
- Merge into debian/sid
Status: | Needs review | ||||
---|---|---|---|---|---|
Proposed branch: | ~liushuyu-011/ubuntu/+source/vinagre:merge-lp2065216 | ||||
Merge into: | ubuntu/+source/vinagre:debian/sid | ||||
Diff against target: |
1467 lines (+648/-521) 12 files modified
debian/changelog (+55/-0) debian/control (+3/-1) debian/control.in (+3/-1) debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch (+18/-20) debian/patches/0004-fix-FreeRDP-API-usage.patch (+14/-13) debian/patches/freerdp1.patch (+26/-0) debian/patches/freerdp2.patch (+226/-0) debian/patches/freerdp3.patch (+46/-38) debian/patches/freerdp4.patch (+203/-0) debian/patches/freerdp5.patch (+49/-0) debian/patches/series (+5/-3) dev/null (+0/-445) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Simon Quigley (community) | Approve | ||
Review via email: mp+465806@code.launchpad.net |
Commit message
Description of the change
This MP merges vinagre changes from Debian unstable into Ubuntu Oracular.
PPA build: https:/
Zixing Liu (liushuyu-011) wrote : | # |
> Please send the delta up to Debian
Delta forwarded as https:/
Unmerged commits
- d1d4ad4... by Zixing Liu
-
finalize changelog
- 2695a35... by Zixing Liu
-
update-maintainer
- 3afe40b... by Zixing Liu
-
reconstruct-
changelog - 21b690f... by Zixing Liu
-
merge-changelogs
- a4cafb8... by Zixing Liu
-
d/patches: re-import patches from the upstream and refresh the patches ...
... against the Ubuntu-patched source tree
- 9db8503... by Zixing Liu
-
* Fix compatibility with FreeRDP 2.1.1 security update.
- debian/patches/ freerdp* .patch: backport series of upstream patches to
fix compatibility wither newer FreeRDP versions.
- d/p/0001-Revert- Improve- FreeRDP- authentication- failure- handli. patch:
removed, no longer needed.
- d/p/0002-Revert- Store-credentia ls-for- RDP.patch: removed, no longer
needed.
- d/p/freerdp2017.patch: removed, replaced with upstream patches.
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog |
2 | index 911a50a..7c71993 100644 |
3 | --- a/debian/changelog |
4 | +++ b/debian/changelog |
5 | @@ -1,3 +1,20 @@ |
6 | +vinagre (3.22.0-8.1ubuntu1) oracular; urgency=medium |
7 | + |
8 | + * Merge with Debian unstable (LP: #2065216). Remaining changes: |
9 | + * Fix compatibility with FreeRDP 2.1.1 security update. |
10 | + - debian/patches/freerdp*.patch: backport series of upstream patches to |
11 | + fix compatibility wither newer FreeRDP versions. |
12 | + - d/p/0001-Revert-Improve-FreeRDP-authentication-failure-handli.patch: |
13 | + removed, no longer needed. |
14 | + - d/p/0002-Revert-Store-credentials-for-RDP.patch: removed, no longer |
15 | + needed. |
16 | + - d/p/freerdp2017.patch: removed, replaced with upstream patches. |
17 | + * New Changes: |
18 | + - d/patches: re-import patches from the upstream and refresh the patches |
19 | + against the Ubuntu-patched source tree. |
20 | + |
21 | + -- Zixing Liu <zixing.liu@canonical.com> Wed, 08 May 2024 15:11:43 -0600 |
22 | + |
23 | vinagre (3.22.0-8.1) unstable; urgency=medium |
24 | |
25 | * Non-maintainer upload. |
26 | @@ -9,6 +26,44 @@ vinagre (3.22.0-8.1) unstable; urgency=medium |
27 | |
28 | -- Mike Gabriel <sunweaver@debian.org> Sun, 16 May 2021 23:11:19 +0200 |
29 | |
30 | +vinagre (3.22.0-8ubuntu5) noble; urgency=medium |
31 | + |
32 | + * No-change rebuild for CVE-2024-3094 |
33 | + |
34 | + -- William Grant <wgrant@ubuntu.com> Mon, 01 Apr 2024 19:32:22 +1100 |
35 | + |
36 | +vinagre (3.22.0-8ubuntu4) noble; urgency=medium |
37 | + |
38 | + * No-change rebuild against freerdp2 with t64 |
39 | + |
40 | + -- Simon Chopin <schopin@ubuntu.com> Fri, 29 Mar 2024 17:36:09 +0100 |
41 | + |
42 | +vinagre (3.22.0-8ubuntu3) noble; urgency=medium |
43 | + |
44 | + * No-change rebuild against libglib2.0-0t64 |
45 | + |
46 | + -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 08 Mar 2024 07:56:49 +0000 |
47 | + |
48 | +vinagre (3.22.0-8ubuntu2) hirsute; urgency=medium |
49 | + |
50 | + * No change rebuild with fixed ownership. |
51 | + |
52 | + -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 16 Feb 2021 17:06:39 +0000 |
53 | + |
54 | +vinagre (3.22.0-8ubuntu1) hirsute; urgency=medium |
55 | + |
56 | + * Resynchronize on Debian, remaining change |
57 | + * Fix compatibility with FreeRDP 2.1.1 security update. |
58 | + - debian/patches/freerdp*.patch: backport series of upstream patches to |
59 | + fix compatibility wither newer FreeRDP versions. |
60 | + - d/p/0001-Revert-Improve-FreeRDP-authentication-failure-handli.patch: |
61 | + removed, no longer needed. |
62 | + - d/p/0002-Revert-Store-credentials-for-RDP.patch: removed, no longer |
63 | + needed. |
64 | + - d/p/freerdp2017.patch: removed, replaced with upstream patches. |
65 | + |
66 | + -- Sebastien Bacher <seb128@ubuntu.com> Mon, 15 Feb 2021 16:36:23 +0100 |
67 | + |
68 | vinagre (3.22.0-8) unstable; urgency=medium |
69 | |
70 | * Team upload. |
71 | diff --git a/debian/control b/debian/control |
72 | index 546eb98..047a1f9 100644 |
73 | --- a/debian/control |
74 | +++ b/debian/control |
75 | @@ -5,7 +5,8 @@ |
76 | Source: vinagre |
77 | Section: gnome |
78 | Priority: optional |
79 | -Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> |
80 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
81 | +XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> |
82 | Uploaders: Jeremy Bicha <jbicha@debian.org>, Laurent Bigonville <bigon@debian.org>, Michael Biebl <biebl@debian.org> |
83 | Build-Depends: debhelper-compat (= 12), |
84 | gnome-pkg-tools (>= 0.10), |
85 | @@ -18,6 +19,7 @@ Build-Depends: debhelper-compat (= 12), |
86 | libspice-client-gtk-3.0-dev (>= 0.5) [linux-any], |
87 | libavahi-ui-gtk3-dev (>= 0.6.26), |
88 | libavahi-gobject-dev (>= 0.6.26), |
89 | + libdbus-glib-1-dev, |
90 | libsecret-1-dev, |
91 | valac (>= 0.12.0), |
92 | yelp-tools, |
93 | diff --git a/debian/control.in b/debian/control.in |
94 | index afeaf0f..dd62306 100644 |
95 | --- a/debian/control.in |
96 | +++ b/debian/control.in |
97 | @@ -1,7 +1,8 @@ |
98 | Source: vinagre |
99 | Section: gnome |
100 | Priority: optional |
101 | -Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> |
102 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
103 | +XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> |
104 | Uploaders: @GNOME_TEAM@ |
105 | Build-Depends: debhelper-compat (= 12), |
106 | gnome-pkg-tools (>= 0.10), |
107 | @@ -14,6 +15,7 @@ Build-Depends: debhelper-compat (= 12), |
108 | libspice-client-gtk-3.0-dev (>= 0.5) [linux-any], |
109 | libavahi-ui-gtk3-dev (>= 0.6.26), |
110 | libavahi-gobject-dev (>= 0.6.26), |
111 | + libdbus-glib-1-dev, |
112 | libsecret-1-dev, |
113 | valac (>= 0.12.0), |
114 | yelp-tools, |
115 | diff --git a/debian/patches/0001-Revert-Improve-FreeRDP-authentication-failure-handli.patch b/debian/patches/0001-Revert-Improve-FreeRDP-authentication-failure-handli.patch |
116 | deleted file mode 100644 |
117 | index 13bbd51..0000000 |
118 | --- a/debian/patches/0001-Revert-Improve-FreeRDP-authentication-failure-handli.patch |
119 | +++ /dev/null |
120 | @@ -1,53 +0,0 @@ |
121 | -From 8ebc0685b85e0d1f70eb00171f2e7712de3d44bd Mon Sep 17 00:00:00 2001 |
122 | -From: Michael Biebl <biebl@debian.org> |
123 | -Date: Thu, 22 Sep 2016 01:15:55 +0200 |
124 | -Subject: [PATCH 1/2] Revert "Improve FreeRDP authentication failure handling" |
125 | - |
126 | -This reverts commit d7b4f88943e8615d252d27e1efc58cb64a9e1821. |
127 | ---- |
128 | - plugins/rdp/vinagre-rdp-tab.c | 10 ++++++---- |
129 | - 1 file changed, 6 insertions(+), 4 deletions(-) |
130 | - |
131 | -diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
132 | -index b731f9b..8572bc3 100644 |
133 | ---- a/plugins/rdp/vinagre-rdp-tab.c |
134 | -+++ b/plugins/rdp/vinagre-rdp-tab.c |
135 | -@@ -1195,8 +1195,8 @@ open_freerdp (VinagreRdpTab *rdp_tab) |
136 | - VinagreTab *tab = VINAGRE_TAB (rdp_tab); |
137 | - GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); |
138 | - gboolean success = TRUE; |
139 | -+ gboolean authentication_error = FALSE; |
140 | - gboolean cancelled = FALSE; |
141 | -- guint authentication_errors = 0; |
142 | - |
143 | - priv->events = g_queue_new (); |
144 | - |
145 | -@@ -1205,12 +1205,14 @@ open_freerdp (VinagreRdpTab *rdp_tab) |
146 | - |
147 | - do |
148 | - { |
149 | -+ authentication_error = FALSE; |
150 | -+ |
151 | - /* Run FreeRDP session */ |
152 | - success = freerdp_connect (priv->freerdp_session); |
153 | - if (!success) |
154 | - { |
155 | -- authentication_errors += freerdp_get_last_error (priv->freerdp_session->context) == 0x20009 || |
156 | -- freerdp_get_last_error (priv->freerdp_session->context) == 0x2000c; |
157 | -+ authentication_error = freerdp_get_last_error (priv->freerdp_session->context) == 0x20009 || |
158 | -+ freerdp_get_last_error (priv->freerdp_session->context) == 0x2000c; |
159 | - |
160 | - cancelled = freerdp_get_last_error (priv->freerdp_session->context) == 0x2000b; |
161 | - |
162 | -@@ -1218,7 +1220,7 @@ open_freerdp (VinagreRdpTab *rdp_tab) |
163 | - init_freerdp (rdp_tab); |
164 | - } |
165 | - } |
166 | -- while (!success && authentication_errors < 3); |
167 | -+ while (!success && authentication_error); |
168 | - |
169 | - if (!success) |
170 | - { |
171 | --- |
172 | -2.9.3 |
173 | - |
174 | diff --git a/debian/patches/0002-Revert-Store-credentials-for-RDP.patch b/debian/patches/0002-Revert-Store-credentials-for-RDP.patch |
175 | deleted file mode 100644 |
176 | index bb2a701..0000000 |
177 | --- a/debian/patches/0002-Revert-Store-credentials-for-RDP.patch |
178 | +++ /dev/null |
179 | @@ -1,445 +0,0 @@ |
180 | -From bb1828b6b7eb29bb037bcc687cf10f916ddc7561 Mon Sep 17 00:00:00 2001 |
181 | -From: Michael Biebl <biebl@debian.org> |
182 | -Date: Thu, 22 Sep 2016 01:18:16 +0200 |
183 | -Subject: [PATCH 2/2] Revert "Store credentials for RDP" |
184 | - |
185 | -This reverts commit 60dea279a24c7f0e398b89a0a60d45e80087ed1d. |
186 | ---- |
187 | - plugins/rdp/vinagre-rdp-connection.c | 22 +--- |
188 | - plugins/rdp/vinagre-rdp-plugin.c | 29 +---- |
189 | - plugins/rdp/vinagre-rdp-tab.c | 231 +++++++++++++++++------------------ |
190 | - 3 files changed, 123 insertions(+), 159 deletions(-) |
191 | - |
192 | -diff --git a/plugins/rdp/vinagre-rdp-connection.c b/plugins/rdp/vinagre-rdp-connection.c |
193 | -index f0ff02b..c5f6ed1 100644 |
194 | ---- a/plugins/rdp/vinagre-rdp-connection.c |
195 | -+++ b/plugins/rdp/vinagre-rdp-connection.c |
196 | -@@ -127,25 +127,9 @@ rdp_parse_item (VinagreConnection *conn, xmlNode *root) |
197 | - static void |
198 | - rdp_parse_options_widget (VinagreConnection *conn, GtkWidget *widget) |
199 | - { |
200 | -- const gchar *text; |
201 | -- GtkWidget *u_entry, *d_entry, *spin_button, *scaling_button; |
202 | -- gboolean scaling; |
203 | -- guint width, height; |
204 | -- |
205 | -- d_entry = g_object_get_data (G_OBJECT (widget), "domain_entry"); |
206 | -- if (!d_entry) |
207 | -- { |
208 | -- g_warning ("Wrong widget passed to rdp_parse_options_widget()"); |
209 | -- return; |
210 | -- } |
211 | -- |
212 | -- text = gtk_entry_get_text (GTK_ENTRY (d_entry)); |
213 | -- vinagre_cache_prefs_set_string ("rdp-connection", "domain", text); |
214 | -- |
215 | -- g_object_set (conn, |
216 | -- "domain", text != NULL && *text != '\0' ? text : NULL, |
217 | -- NULL); |
218 | -- |
219 | -+ GtkWidget *u_entry, *spin_button, *scaling_button; |
220 | -+ gboolean scaling; |
221 | -+ guint width, height; |
222 | - |
223 | - u_entry = g_object_get_data (G_OBJECT (widget), "username_entry"); |
224 | - if (!u_entry) |
225 | -diff --git a/plugins/rdp/vinagre-rdp-plugin.c b/plugins/rdp/vinagre-rdp-plugin.c |
226 | -index 4751102..f41da37 100644 |
227 | ---- a/plugins/rdp/vinagre-rdp-plugin.c |
228 | -+++ b/plugins/rdp/vinagre-rdp-plugin.c |
229 | -@@ -100,7 +100,7 @@ vinagre_rdp_plugin_init (VinagreRdpPlugin *plugin) |
230 | - static GtkWidget * |
231 | - impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) |
232 | - { |
233 | -- GtkWidget *grid, *label, *u_entry, *d_entry, *spin_button, *check; |
234 | -+ GtkWidget *grid, *label, *u_entry, *spin_button, *check; |
235 | - gchar *str; |
236 | - gint width, height; |
237 | - |
238 | -@@ -146,29 +146,10 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) |
239 | - g_free (str); |
240 | - |
241 | - |
242 | -- label = gtk_label_new_with_mnemonic (_("_Domain:")); |
243 | -- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); |
244 | -- gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1); |
245 | -- gtk_widget_set_margin_left (label, 12); |
246 | -- |
247 | -- d_entry = gtk_entry_new (); |
248 | -- /* Translators: This is the tooltip for the domain field in a RDP connection */ |
249 | -- gtk_widget_set_tooltip_text (d_entry, _("Optional.")); |
250 | -- g_object_set_data (G_OBJECT (grid), "domain_entry", d_entry); |
251 | -- gtk_grid_attach (GTK_GRID (grid), d_entry, 1, 3, 1, 1); |
252 | -- gtk_label_set_mnemonic_widget (GTK_LABEL (label), d_entry); |
253 | -- str = g_strdup (VINAGRE_IS_CONNECTION (conn) ? |
254 | -- vinagre_connection_get_domain (conn) : |
255 | -- vinagre_cache_prefs_get_string ("rdp-connection", "domain", "")); |
256 | -- gtk_entry_set_text (GTK_ENTRY (d_entry), str); |
257 | -- gtk_entry_set_activates_default (GTK_ENTRY (d_entry), TRUE); |
258 | -- g_free (str); |
259 | -- |
260 | -- |
261 | - /* Host width */ |
262 | - label = gtk_label_new_with_mnemonic (_("_Width:")); |
263 | - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); |
264 | -- gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1); |
265 | -+ gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1); |
266 | - gtk_widget_set_margin_left (label, 12); |
267 | - |
268 | - spin_button = gtk_spin_button_new_with_range (MIN_SIZE, MAX_SIZE, 1); |
269 | -@@ -176,7 +157,7 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) |
270 | - gtk_widget_set_tooltip_text (spin_button, _("Set width of the remote desktop")); |
271 | - gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin_button), DEFAULT_WIDTH); |
272 | - g_object_set_data (G_OBJECT (grid), "width_spin_button", spin_button); |
273 | -- gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 4, 1, 1); |
274 | -+ gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 3, 1, 1); |
275 | - gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin_button); |
276 | - width = VINAGRE_IS_CONNECTION (conn) ? |
277 | - vinagre_connection_get_width (conn) : |
278 | -@@ -188,7 +169,7 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) |
279 | - /* Host height */ |
280 | - label = gtk_label_new_with_mnemonic (_("_Height:")); |
281 | - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); |
282 | -- gtk_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 1); |
283 | -+ gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1); |
284 | - gtk_widget_set_margin_left (label, 12); |
285 | - |
286 | - spin_button = gtk_spin_button_new_with_range (MIN_SIZE, MAX_SIZE, 1); |
287 | -@@ -196,7 +177,7 @@ impl_get_connect_widget (VinagreProtocol *plugin, VinagreConnection *conn) |
288 | - gtk_widget_set_tooltip_text (spin_button, _("Set height of the remote desktop")); |
289 | - gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin_button), DEFAULT_HEIGHT); |
290 | - g_object_set_data (G_OBJECT (grid), "height_spin_button", spin_button); |
291 | -- gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 5, 1, 1); |
292 | -+ gtk_grid_attach (GTK_GRID (grid), spin_button, 1, 4, 1, 1); |
293 | - gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin_button); |
294 | - height = VINAGRE_IS_CONNECTION (conn) ? |
295 | - vinagre_connection_get_height (conn) : |
296 | -diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
297 | -index 8572bc3..f3d9c08 100644 |
298 | ---- a/plugins/rdp/vinagre-rdp-tab.c |
299 | -+++ b/plugins/rdp/vinagre-rdp-tab.c |
300 | -@@ -70,8 +70,6 @@ struct _VinagreRdpTabPrivate |
301 | - gboolean scaling; |
302 | - double scale; |
303 | - double offset_x, offset_y; |
304 | -- |
305 | -- guint authentication_attempts; |
306 | - }; |
307 | - |
308 | - G_DEFINE_TYPE (VinagreRdpTab, vinagre_rdp_tab, VINAGRE_TYPE_TAB) |
309 | -@@ -611,7 +609,6 @@ frdp_post_connect (freerdp *instance) |
310 | - 0, 0, |
311 | - gdi->width, gdi->height); |
312 | - |
313 | -- vinagre_tab_save_credentials_in_keyring (VINAGRE_TAB (rdp_tab)); |
314 | - vinagre_tab_add_recent_used (VINAGRE_TAB (rdp_tab)); |
315 | - vinagre_tab_set_state (VINAGRE_TAB (rdp_tab), VINAGRE_TAB_STATE_CONNECTED); |
316 | - |
317 | -@@ -862,76 +859,114 @@ frdp_mouse_moved (GtkWidget *widget, |
318 | - return TRUE; |
319 | - } |
320 | - |
321 | -+static void |
322 | -+entry_text_changed_cb (GtkEntry *entry, |
323 | -+ GtkBuilder *builder) |
324 | -+{ |
325 | -+ const gchar *text; |
326 | -+ GtkWidget *widget; |
327 | -+ gsize username_length; |
328 | -+ gsize password_length; |
329 | -+ |
330 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "username_entry")); |
331 | -+ text = gtk_entry_get_text (GTK_ENTRY (widget)); |
332 | -+ username_length = strlen (text); |
333 | -+ |
334 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "password_entry")); |
335 | -+ text = gtk_entry_get_text (GTK_ENTRY (widget)); |
336 | -+ password_length = strlen (text); |
337 | -+ |
338 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "ok_button")); |
339 | -+ gtk_widget_set_sensitive (widget, password_length > 0 && username_length > 0); |
340 | -+} |
341 | -+ |
342 | - static gboolean |
343 | - frdp_authenticate (freerdp *instance, |
344 | - char **username, |
345 | - char **password, |
346 | - char **domain) |
347 | - { |
348 | -- VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); |
349 | -- VinagreRdpTab *rdp_tab = VINAGRE_RDP_TAB (tab); |
350 | -- VinagreRdpTabPrivate *priv = rdp_tab->priv; |
351 | -- VinagreConnection *conn = vinagre_tab_get_conn (tab); |
352 | -- GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); |
353 | -- gboolean save_in_keyring = FALSE; |
354 | -- gchar *keyring_domain = NULL; |
355 | -- gchar *keyring_username = NULL; |
356 | -- gchar *keyring_password = NULL; |
357 | -+ VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); |
358 | -+ VinagreConnection *conn = vinagre_tab_get_conn (tab); |
359 | -+ const gchar *user_name; |
360 | -+ const gchar *domain_name; |
361 | -+ GtkBuilder *builder; |
362 | -+ GtkWidget *dialog; |
363 | -+ GtkWidget *widget; |
364 | -+ GtkWidget *username_entry; |
365 | -+ GtkWidget *password_entry; |
366 | -+ GtkWidget *domain_entry; |
367 | -+ gboolean save_credential_check_visible; |
368 | -+ gboolean domain_label_visible; |
369 | -+ gboolean domain_entry_visible; |
370 | -+ gint response; |
371 | - |
372 | -- priv->authentication_attempts++; |
373 | -+ builder = vinagre_utils_get_builder (); |
374 | - |
375 | -- if (priv->authentication_attempts == 1) |
376 | -- { |
377 | -- vinagre_tab_find_credentials_in_keyring (tab, &keyring_domain, &keyring_username, &keyring_password); |
378 | -- if (keyring_password != NULL && keyring_username != NULL) |
379 | -- { |
380 | -- *domain = keyring_domain; |
381 | -- *username = keyring_username; |
382 | -- *password = keyring_password; |
383 | -+ dialog = GTK_WIDGET (gtk_builder_get_object (builder, "auth_required_dialog")); |
384 | -+ gtk_window_set_modal ((GtkWindow *) dialog, TRUE); |
385 | -+ gtk_window_set_transient_for ((GtkWindow *) dialog, GTK_WINDOW (vinagre_tab_get_window (tab))); |
386 | - |
387 | -- return TRUE; |
388 | -- } |
389 | -- else |
390 | -- { |
391 | -- g_free (keyring_domain); |
392 | -- g_free (keyring_username); |
393 | -- g_free (keyring_password); |
394 | -- } |
395 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "host_label")); |
396 | -+ gtk_label_set_text (GTK_LABEL (widget), vinagre_connection_get_host (conn)); |
397 | -+ |
398 | -+ username_entry = GTK_WIDGET (gtk_builder_get_object (builder, "username_entry")); |
399 | -+ password_entry = GTK_WIDGET (gtk_builder_get_object (builder, "password_entry")); |
400 | -+ domain_entry = GTK_WIDGET (gtk_builder_get_object (builder, "domain_entry")); |
401 | -+ |
402 | -+ if (*username != NULL && *username[0] != '\0') |
403 | -+ { |
404 | -+ gtk_entry_set_text (GTK_ENTRY (username_entry), *username); |
405 | -+ gtk_widget_grab_focus (password_entry); |
406 | - } |
407 | - |
408 | -- if (vinagre_utils_request_credential (window, |
409 | -- "RDP", |
410 | -- vinagre_connection_get_host (conn), |
411 | -- vinagre_connection_get_domain (conn), |
412 | -- vinagre_connection_get_username (conn), |
413 | -- TRUE, |
414 | -- TRUE, |
415 | -- TRUE, |
416 | -- 20, |
417 | -- domain, |
418 | -- username, |
419 | -- password, |
420 | -- &save_in_keyring)) |
421 | -+ g_signal_connect (username_entry, "changed", G_CALLBACK (entry_text_changed_cb), builder); |
422 | -+ g_signal_connect (password_entry, "changed", G_CALLBACK (entry_text_changed_cb), builder); |
423 | -+ |
424 | -+ |
425 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "save_credential_check")); |
426 | -+ save_credential_check_visible = gtk_widget_get_visible (widget); |
427 | -+ gtk_widget_set_visible (widget, FALSE); |
428 | -+ |
429 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "domain_label")); |
430 | -+ domain_label_visible = gtk_widget_get_visible (widget); |
431 | -+ gtk_widget_set_visible (widget, TRUE); |
432 | -+ |
433 | -+ domain_entry_visible = gtk_widget_get_visible (domain_entry); |
434 | -+ gtk_widget_set_visible (domain_entry, TRUE); |
435 | -+ |
436 | -+ |
437 | -+ response = gtk_dialog_run (GTK_DIALOG (dialog)); |
438 | -+ gtk_widget_hide (dialog); |
439 | -+ |
440 | -+ |
441 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "save_credential_check")); |
442 | -+ gtk_widget_set_visible (widget, save_credential_check_visible); |
443 | -+ |
444 | -+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "domain_label")); |
445 | -+ gtk_widget_set_visible (widget, domain_label_visible); |
446 | -+ |
447 | -+ gtk_widget_set_visible (domain_entry, domain_entry_visible); |
448 | -+ |
449 | -+ |
450 | -+ if (response == GTK_RESPONSE_OK) |
451 | - { |
452 | -- if (*domain && **domain != '\0') |
453 | -- vinagre_connection_set_domain (conn, *domain); |
454 | -+ domain_name = gtk_entry_get_text (GTK_ENTRY (domain_entry)); |
455 | -+ if (g_strcmp0 (*domain, domain_name) != 0) |
456 | -+ *domain = g_strdup (domain_name); |
457 | - |
458 | -- if (*username && **username != '\0') |
459 | -- vinagre_connection_set_username (conn, *username); |
460 | -+ user_name = gtk_entry_get_text (GTK_ENTRY (username_entry)); |
461 | -+ if (g_strcmp0 (*username, user_name) != 0) |
462 | -+ *username = g_strdup (user_name); |
463 | - |
464 | -- if (*password && **password != '\0') |
465 | -- vinagre_connection_set_password (conn, *password); |
466 | -+ *password = g_strdup (gtk_entry_get_text (GTK_ENTRY (password_entry))); |
467 | - |
468 | -- vinagre_tab_set_save_credentials (tab, save_in_keyring); |
469 | -+ return TRUE; |
470 | - } |
471 | - else |
472 | - { |
473 | -- vinagre_tab_remove_from_notebook (tab); |
474 | -- |
475 | - return FALSE; |
476 | - } |
477 | -- |
478 | -- return TRUE; |
479 | - } |
480 | - |
481 | - static BOOL |
482 | -@@ -1028,25 +1063,30 @@ frdp_changed_certificate_verify (freerdp *instance, |
483 | - #endif |
484 | - |
485 | - static void |
486 | --init_freerdp (VinagreRdpTab *rdp_tab) |
487 | -+open_freerdp (VinagreRdpTab *rdp_tab) |
488 | - { |
489 | - VinagreRdpTabPrivate *priv = rdp_tab->priv; |
490 | -- rdpSettings *settings; |
491 | - VinagreTab *tab = VINAGRE_TAB (rdp_tab); |
492 | - VinagreConnection *conn = vinagre_tab_get_conn (tab); |
493 | -- gboolean scaling; |
494 | -- gchar *hostname; |
495 | -- gint width, height; |
496 | -- gint port; |
497 | -+ rdpSettings *settings; |
498 | -+ GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); |
499 | -+ gboolean success = TRUE; |
500 | -+ gboolean fullscreen, scaling; |
501 | -+ gchar *hostname, *username; |
502 | -+ gint port, width, height; |
503 | - |
504 | - g_object_get (conn, |
505 | - "port", &port, |
506 | - "host", &hostname, |
507 | - "width", &width, |
508 | - "height", &height, |
509 | -+ "fullscreen", &fullscreen, |
510 | - "scaling", &scaling, |
511 | -+ "username", &username, |
512 | - NULL); |
513 | - |
514 | -+ priv->events = g_queue_new (); |
515 | -+ |
516 | - /* Setup FreeRDP session */ |
517 | - priv->freerdp_session = freerdp_new (); |
518 | - priv->freerdp_session->PreConnect = frdp_pre_connect; |
519 | -@@ -1111,6 +1151,17 @@ init_freerdp (VinagreRdpTab *rdp_tab) |
520 | - settings->port = port; |
521 | - #endif |
522 | - |
523 | -+ /* Set username */ |
524 | -+ username = g_strstrip (username); |
525 | -+ if (username != NULL && username[0] != '\0') |
526 | -+ { |
527 | -+#if HAVE_FREERDP_1_1 |
528 | -+ settings->Username = g_strdup (username); |
529 | -+#else |
530 | -+ settings->username = g_strdup (username); |
531 | -+#endif |
532 | -+ } |
533 | -+ |
534 | - /* Set keyboard layout */ |
535 | - #if HAVE_FREERDP_1_1 |
536 | - freerdp_keyboard_init (KBD_US); |
537 | -@@ -1120,24 +1171,6 @@ init_freerdp (VinagreRdpTab *rdp_tab) |
538 | - |
539 | - /* Allow font smoothing by default */ |
540 | - settings->AllowFontSmoothing = TRUE; |
541 | --} |
542 | -- |
543 | --static void |
544 | --init_display (VinagreRdpTab *rdp_tab) |
545 | --{ |
546 | -- VinagreRdpTabPrivate *priv = rdp_tab->priv; |
547 | -- VinagreTab *tab = VINAGRE_TAB (rdp_tab); |
548 | -- VinagreConnection *conn = vinagre_tab_get_conn (tab); |
549 | -- GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); |
550 | -- gboolean fullscreen, scaling; |
551 | -- gint width, height; |
552 | -- |
553 | -- g_object_get (conn, |
554 | -- "width", &width, |
555 | -- "height", &height, |
556 | -- "fullscreen", &fullscreen, |
557 | -- "scaling", &scaling, |
558 | -- NULL); |
559 | - |
560 | - /* Setup display for FreeRDP session */ |
561 | - priv->display = gtk_drawing_area_new (); |
562 | -@@ -1186,54 +1219,20 @@ init_display (VinagreRdpTab *rdp_tab) |
563 | - priv->key_release_handler_id = g_signal_connect (GTK_WIDGET (tab), "key-release-event", |
564 | - G_CALLBACK (frdp_key_pressed), |
565 | - rdp_tab); |
566 | --} |
567 | -- |
568 | --static void |
569 | --open_freerdp (VinagreRdpTab *rdp_tab) |
570 | --{ |
571 | -- VinagreRdpTabPrivate *priv = rdp_tab->priv; |
572 | -- VinagreTab *tab = VINAGRE_TAB (rdp_tab); |
573 | -- GtkWindow *window = GTK_WINDOW (vinagre_tab_get_window (tab)); |
574 | -- gboolean success = TRUE; |
575 | -- gboolean authentication_error = FALSE; |
576 | -- gboolean cancelled = FALSE; |
577 | -- |
578 | -- priv->events = g_queue_new (); |
579 | -- |
580 | -- init_freerdp (rdp_tab); |
581 | -- init_display (rdp_tab); |
582 | -- |
583 | -- do |
584 | -- { |
585 | -- authentication_error = FALSE; |
586 | - |
587 | -- /* Run FreeRDP session */ |
588 | -- success = freerdp_connect (priv->freerdp_session); |
589 | -- if (!success) |
590 | -- { |
591 | -- authentication_error = freerdp_get_last_error (priv->freerdp_session->context) == 0x20009 || |
592 | -- freerdp_get_last_error (priv->freerdp_session->context) == 0x2000c; |
593 | -- |
594 | -- cancelled = freerdp_get_last_error (priv->freerdp_session->context) == 0x2000b; |
595 | -- |
596 | -- freerdp_free (priv->freerdp_session); |
597 | -- init_freerdp (rdp_tab); |
598 | -- } |
599 | -- } |
600 | -- while (!success && authentication_error); |
601 | -+ /* Run FreeRDP session */ |
602 | -+ success = freerdp_connect (priv->freerdp_session); |
603 | - |
604 | - if (!success) |
605 | - { |
606 | - gtk_window_unfullscreen (window); |
607 | -- if (!cancelled) |
608 | -- vinagre_utils_show_error_dialog (_("Error connecting to host."), |
609 | -- NULL, |
610 | -- window); |
611 | -+ vinagre_utils_show_error_dialog (_("Error connecting to host."), |
612 | -+ NULL, |
613 | -+ window); |
614 | - g_idle_add ((GSourceFunc) idle_close, rdp_tab); |
615 | - } |
616 | - else |
617 | - { |
618 | -- priv->authentication_attempts = 0; |
619 | - priv->update_id = g_idle_add ((GSourceFunc) update, rdp_tab); |
620 | - } |
621 | - } |
622 | --- |
623 | -2.9.3 |
624 | - |
625 | diff --git a/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch b/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch |
626 | index e4bafdf..4c606b9 100644 |
627 | --- a/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch |
628 | +++ b/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch |
629 | @@ -20,24 +20,29 @@ See: https://gitlab.gnome.org/GNOME/gtk-frdp/-/issues/27 |
630 | plugins/rdp/vinagre-rdp-tab.c | 27 --------------------------- |
631 | 2 files changed, 1 insertion(+), 28 deletions(-) |
632 | |
633 | +diff --git a/configure.ac b/configure.ac |
634 | +index 61617f1a..445b3e74 100644 |
635 | --- a/configure.ac |
636 | +++ b/configure.ac |
637 | -@@ -58,7 +58,7 @@ |
638 | +@@ -58,7 +58,7 @@ AS_IF([test "x$have_ssh" = "xyes"], |
639 | AM_CONDITIONAL([VINAGRE_ENABLE_SSH], [test "x$have_ssh" = "xyes"]) |
640 | |
641 | # Whether to enable support for RDP. |
642 | -RDP_DEPS="freerdp2 x11" |
643 | +RDP_DEPS="freerdp2 >= 2.0.0 x11" |
644 | + |
645 | AC_ARG_ENABLE([rdp], |
646 | [AS_HELP_STRING([--disable-rdp], |
647 | - [Disable Remote Desktop Protocol (RDP) support])]) |
648 | +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
649 | +index bbb8adf5..046b0b95 100644 |
650 | --- a/plugins/rdp/vinagre-rdp-tab.c |
651 | +++ b/plugins/rdp/vinagre-rdp-tab.c |
652 | -@@ -524,32 +524,7 @@ frdp_pre_connect (freerdp *instance) |
653 | +@@ -522,33 +522,6 @@ frdp_end_paint (rdpContext *context) |
654 | + static BOOL |
655 | + frdp_pre_connect (freerdp *instance) |
656 | { |
657 | - rdpSettings *settings = instance->settings; |
658 | - |
659 | --#if HAVE_FREERDP_1_1 |
660 | +- rdpSettings *settings = instance->settings; |
661 | +- |
662 | - settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE; |
663 | - settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE; |
664 | - settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE; |
665 | @@ -62,17 +67,10 @@ See: https://gitlab.gnome.org/GNOME/gtk-frdp/-/issues/27 |
666 | - settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE; |
667 | - settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE; |
668 | - settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE; |
669 | --#else |
670 | -+#if !HAVE_FREERDP_1_1 |
671 | - settings->order_support[NEG_DSTBLT_INDEX] = true; |
672 | - settings->order_support[NEG_PATBLT_INDEX] = true; |
673 | - settings->order_support[NEG_SCRBLT_INDEX] = true; |
674 | -@@ -1122,6 +1097,8 @@ open_freerdp (VinagreRdpTab *rdp_tab) |
675 | - settings->encryption = true; |
676 | - settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; |
677 | - settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; |
678 | -+ settings->AllowUnanouncedOrdersFromServer = true; |
679 | -+ settings->BitmapCacheEnabled = true; |
680 | - #endif |
681 | - #include <freerdp/version.h> |
682 | - #if (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2 && FREERDP_VERSION_REVISION >= 1) || (FREERDP_VERSION_MAJOR == 2) |
683 | +- |
684 | + return TRUE; |
685 | + } |
686 | + |
687 | +-- |
688 | +GitLab |
689 | + |
690 | diff --git a/debian/patches/0004-fix-FreeRDP-API-usage.patch b/debian/patches/0004-fix-FreeRDP-API-usage.patch |
691 | index 8e953d1..fd950ea 100644 |
692 | --- a/debian/patches/0004-fix-FreeRDP-API-usage.patch |
693 | +++ b/debian/patches/0004-fix-FreeRDP-API-usage.patch |
694 | @@ -10,18 +10,19 @@ Subject: [PATCH] Fixed freerdp API use |
695 | plugins/rdp/vinagre-rdp-tab.c | 14 ++++++++++++-- |
696 | 1 file changed, 12 insertions(+), 2 deletions(-) |
697 | |
698 | ---- a/plugins/rdp/vinagre-rdp-tab.c |
699 | -+++ b/plugins/rdp/vinagre-rdp-tab.c |
700 | -@@ -70,6 +70,8 @@ |
701 | - gboolean scaling; |
702 | - double scale; |
703 | +Index: vinagre/plugins/rdp/vinagre-rdp-tab.c |
704 | +=================================================================== |
705 | +--- vinagre.orig/plugins/rdp/vinagre-rdp-tab.c |
706 | ++++ vinagre/plugins/rdp/vinagre-rdp-tab.c |
707 | +@@ -62,6 +62,7 @@ struct _VinagreRdpTabPrivate |
708 | double offset_x, offset_y; |
709 | -+ |
710 | + |
711 | + guint authentication_attempts; |
712 | + gboolean is_connected; |
713 | }; |
714 | |
715 | G_DEFINE_TYPE (VinagreRdpTab, vinagre_rdp_tab, VINAGRE_TYPE_TAB) |
716 | -@@ -178,8 +180,9 @@ |
717 | +@@ -170,8 +171,9 @@ vinagre_rdp_tab_dispose (GObject *object |
718 | |
719 | if (priv->freerdp_session) |
720 | { |
721 | @@ -33,7 +34,7 @@ Subject: [PATCH] Fixed freerdp API use |
722 | freerdp_context_free (priv->freerdp_session); |
723 | g_clear_pointer (&priv->freerdp_session, freerdp_free); |
724 | } |
725 | -@@ -584,6 +587,12 @@ |
726 | +@@ -556,6 +558,12 @@ frdp_post_connect (freerdp *instance) |
727 | return TRUE; |
728 | } |
729 | |
730 | @@ -46,17 +47,17 @@ Subject: [PATCH] Fixed freerdp API use |
731 | static gboolean |
732 | update (gpointer user_data) |
733 | { |
734 | -@@ -1065,6 +1074,7 @@ |
735 | +@@ -978,6 +986,7 @@ init_freerdp (VinagreRdpTab *rdp_tab) |
736 | priv->freerdp_session = freerdp_new (); |
737 | priv->freerdp_session->PreConnect = frdp_pre_connect; |
738 | priv->freerdp_session->PostConnect = frdp_post_connect; |
739 | + priv->freerdp_session->PostDisconnect = frdp_post_disconnect; |
740 | priv->freerdp_session->Authenticate = frdp_authenticate; |
741 | priv->freerdp_session->VerifyCertificate = frdp_certificate_verify; |
742 | - #if HAVE_FREERDP_1_1 |
743 | -@@ -1199,6 +1209,7 @@ |
744 | - /* Run FreeRDP session */ |
745 | - success = freerdp_connect (priv->freerdp_session); |
746 | + priv->freerdp_session->VerifyChangedCertificate = frdp_changed_certificate_verify; |
747 | +@@ -1111,6 +1120,7 @@ open_freerdp (VinagreRdpTab *rdp_tab) |
748 | + } |
749 | + while (!success && !cancelled && authentication_errors < 3); |
750 | |
751 | + priv->is_connected = success; |
752 | if (!success) |
753 | diff --git a/debian/patches/freerdp1.patch b/debian/patches/freerdp1.patch |
754 | new file mode 100644 |
755 | index 0000000..d607c56 |
756 | --- /dev/null |
757 | +++ b/debian/patches/freerdp1.patch |
758 | @@ -0,0 +1,26 @@ |
759 | +From e41759e91f80c8dfebd4424373c7bf201fb10bf9 Mon Sep 17 00:00:00 2001 |
760 | +From: Guido Aulisi <guido.aulisi@gmail.com> |
761 | +Date: Wed, 8 Nov 2017 09:05:16 +0100 |
762 | +Subject: [PATCH] Let the user cancel the FreeRDP auth dialog |
763 | + |
764 | +https://gitlab.gnome.org/GNOME/vinagre/merge_requests/2 |
765 | +--- |
766 | + plugins/rdp/vinagre-rdp-tab.c | 2 +- |
767 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
768 | + |
769 | +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
770 | +index b731f9b..5b98c24 100644 |
771 | +--- a/plugins/rdp/vinagre-rdp-tab.c |
772 | ++++ b/plugins/rdp/vinagre-rdp-tab.c |
773 | +@@ -1218,7 +1218,7 @@ open_freerdp (VinagreRdpTab *rdp_tab) |
774 | + init_freerdp (rdp_tab); |
775 | + } |
776 | + } |
777 | +- while (!success && authentication_errors < 3); |
778 | ++ while (!success && !cancelled && authentication_errors < 3); |
779 | + |
780 | + if (!success) |
781 | + { |
782 | +-- |
783 | +2.26.2 |
784 | + |
785 | diff --git a/debian/patches/freerdp2.patch b/debian/patches/freerdp2.patch |
786 | new file mode 100644 |
787 | index 0000000..497e8fd |
788 | --- /dev/null |
789 | +++ b/debian/patches/freerdp2.patch |
790 | @@ -0,0 +1,226 @@ |
791 | +From 7f2166ec271a7a2d4ff2360e5cae1ecc8f5b66d6 Mon Sep 17 00:00:00 2001 |
792 | +From: Ondrej Holy <oholy@redhat.com> |
793 | +Date: Thu, 7 Feb 2019 15:53:52 +0100 |
794 | +Subject: [PATCH] Remove old freerdp compatibility codes |
795 | + |
796 | +Vinagre is not currently buildable against 1.1, nor 1.0 freerdp versions. |
797 | +Let's remove old compatibility codes as they don't work anyway. |
798 | +--- |
799 | + configure.ac | 4 +- |
800 | + plugins/rdp/vinagre-rdp-tab.c | 92 +---------------------------------- |
801 | + 2 files changed, 2 insertions(+), 94 deletions(-) |
802 | + |
803 | +diff --git a/configure.ac b/configure.ac |
804 | +index 5b51a82..2e9f2e1 100644 |
805 | +--- a/configure.ac |
806 | ++++ b/configure.ac |
807 | +@@ -65,9 +65,7 @@ AC_ARG_ENABLE([rdp], |
808 | + |
809 | + AS_IF([test "x$enable_rdp" != "xno"], |
810 | + [PKG_CHECK_EXISTS([$RDP_DEPS], |
811 | +- [have_rdp=yes |
812 | +- PKG_CHECK_EXISTS(freerdp >= 1.1, |
813 | +- [AC_DEFINE([HAVE_FREERDP_1_1], [1], [FreeRDP is of version 1.1 or newer])], [])], |
814 | ++ [have_rdp=yes], |
815 | + [have_rdp=no])], |
816 | + [have_rdp=no]) |
817 | + |
818 | +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
819 | +index 5b98c24..027866a 100644 |
820 | +--- a/plugins/rdp/vinagre-rdp-tab.c |
821 | ++++ b/plugins/rdp/vinagre-rdp-tab.c |
822 | +@@ -29,12 +29,7 @@ |
823 | + #include <freerdp/types.h> |
824 | + #include <freerdp/freerdp.h> |
825 | + #include <freerdp/gdi/gdi.h> |
826 | +-#if HAVE_FREERDP_1_1 |
827 | + #include <freerdp/locale/keyboard.h> |
828 | +-#else |
829 | +-#include <freerdp/kbd/vkcodes.h> |
830 | +-#include <gdk/gdkx.h> |
831 | +-#endif |
832 | + |
833 | + #include "vinagre-rdp-tab.h" |
834 | + #include "vinagre-rdp-connection.h" |
835 | +@@ -44,12 +39,6 @@ |
836 | + |
837 | + #define SELECT_TIMEOUT 50 |
838 | + |
839 | +-#if !HAVE_FREERDP_1_1 |
840 | +-typedef boolean BOOL; |
841 | +-typedef uint8 UINT8; |
842 | +-typedef uint16 UINT16; |
843 | +-#endif |
844 | +- |
845 | + struct _VinagreRdpTabPrivate |
846 | + { |
847 | + freerdp *freerdp_session; |
848 | +@@ -524,7 +513,6 @@ frdp_pre_connect (freerdp *instance) |
849 | + { |
850 | + rdpSettings *settings = instance->settings; |
851 | + |
852 | +-#if HAVE_FREERDP_1_1 |
853 | + settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE; |
854 | + settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE; |
855 | + settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE; |
856 | +@@ -549,32 +537,6 @@ frdp_pre_connect (freerdp *instance) |
857 | + settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE; |
858 | + settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE; |
859 | + settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE; |
860 | +-#else |
861 | +- settings->order_support[NEG_DSTBLT_INDEX] = true; |
862 | +- settings->order_support[NEG_PATBLT_INDEX] = true; |
863 | +- settings->order_support[NEG_SCRBLT_INDEX] = true; |
864 | +- settings->order_support[NEG_OPAQUE_RECT_INDEX] = true; |
865 | +- settings->order_support[NEG_DRAWNINEGRID_INDEX] = false; |
866 | +- settings->order_support[NEG_MULTIDSTBLT_INDEX] = false; |
867 | +- settings->order_support[NEG_MULTIPATBLT_INDEX] = false; |
868 | +- settings->order_support[NEG_MULTISCRBLT_INDEX] = false; |
869 | +- settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = true; |
870 | +- settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = false; |
871 | +- settings->order_support[NEG_LINETO_INDEX] = true; |
872 | +- settings->order_support[NEG_POLYLINE_INDEX] = true; |
873 | +- settings->order_support[NEG_MEMBLT_INDEX] = true; |
874 | +- settings->order_support[NEG_MEM3BLT_INDEX] = false; |
875 | +- settings->order_support[NEG_MEMBLT_V2_INDEX] = true; |
876 | +- settings->order_support[NEG_MEM3BLT_V2_INDEX] = false; |
877 | +- settings->order_support[NEG_SAVEBITMAP_INDEX] = false; |
878 | +- settings->order_support[NEG_GLYPH_INDEX_INDEX] = true; |
879 | +- settings->order_support[NEG_FAST_INDEX_INDEX] = true; |
880 | +- settings->order_support[NEG_FAST_GLYPH_INDEX] = false; |
881 | +- settings->order_support[NEG_POLYGON_SC_INDEX] = false; |
882 | +- settings->order_support[NEG_POLYGON_CB_INDEX] = false; |
883 | +- settings->order_support[NEG_ELLIPSE_SC_INDEX] = false; |
884 | +- settings->order_support[NEG_ELLIPSE_CB_INDEX] = false; |
885 | +-#endif |
886 | + |
887 | + return TRUE; |
888 | + } |
889 | +@@ -587,15 +549,7 @@ frdp_post_connect (freerdp *instance) |
890 | + rdpGdi *gdi; |
891 | + int stride; |
892 | + |
893 | +- gdi_init (instance, |
894 | +-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \ |
895 | +- !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && \ |
896 | +- FREERDP_VERSION_MINOR >= 2)) |
897 | +- CLRBUF_24BPP, |
898 | +-#else |
899 | +- CLRBUF_32BPP, |
900 | +-#endif |
901 | +- NULL); |
902 | ++ gdi_init (instance, CLRBUF_32BPP, NULL); |
903 | + gdi = instance->context->gdi; |
904 | + |
905 | + instance->update->BeginPaint = frdp_begin_paint; |
906 | +@@ -705,21 +659,15 @@ frdp_key_pressed (GtkWidget *widget, |
907 | + VinagreRdpTab *rdp_tab = (VinagreRdpTab *) user_data; |
908 | + VinagreRdpTabPrivate *priv = rdp_tab->priv; |
909 | + frdpEventKey *frdp_event; |
910 | +-#if HAVE_FREERDP_1_1 |
911 | + UINT16 scancode; |
912 | +-#endif |
913 | + |
914 | + frdp_event = g_new0 (frdpEventKey, 1); |
915 | + frdp_event->type = FRDP_EVENT_TYPE_KEY; |
916 | + frdp_event->flags = event->type == GDK_KEY_PRESS ? KBD_FLAGS_DOWN : KBD_FLAGS_RELEASE; |
917 | + |
918 | +-#if HAVE_FREERDP_1_1 |
919 | + scancode = freerdp_keyboard_get_rdp_scancode_from_x11_keycode (event->hardware_keycode); |
920 | + frdp_event->code = RDP_SCANCODE_CODE(scancode); |
921 | + frdp_event->extended = RDP_SCANCODE_EXTENDED(scancode); |
922 | +-#else |
923 | +- frdp_event->code = freerdp_kbd_get_scancode_by_keycode (event->hardware_keycode, &frdp_event->extended); |
924 | +-#endif |
925 | + |
926 | + if (frdp_event->extended) |
927 | + frdp_event->flags |= KBD_FLAGS_EXTENDED; |
928 | +@@ -972,7 +920,6 @@ frdp_certificate_verify (freerdp *instance, |
929 | + } |
930 | + |
931 | + |
932 | +-#if HAVE_FREERDP_1_1 |
933 | + static BOOL |
934 | + frdp_changed_certificate_verify (freerdp *instance, |
935 | + char *subject, |
936 | +@@ -1025,7 +972,6 @@ frdp_changed_certificate_verify (freerdp *instance, |
937 | + |
938 | + return response == GTK_RESPONSE_YES; |
939 | + } |
940 | +-#endif |
941 | + |
942 | + static void |
943 | + init_freerdp (VinagreRdpTab *rdp_tab) |
944 | +@@ -1053,15 +999,8 @@ init_freerdp (VinagreRdpTab *rdp_tab) |
945 | + priv->freerdp_session->PostConnect = frdp_post_connect; |
946 | + priv->freerdp_session->Authenticate = frdp_authenticate; |
947 | + priv->freerdp_session->VerifyCertificate = frdp_certificate_verify; |
948 | +-#if HAVE_FREERDP_1_1 |
949 | + priv->freerdp_session->VerifyChangedCertificate = frdp_changed_certificate_verify; |
950 | +-#endif |
951 | +- |
952 | +-#if HAVE_FREERDP_1_1 |
953 | + priv->freerdp_session->ContextSize = sizeof (frdpContext); |
954 | +-#else |
955 | +- priv->freerdp_session->context_size = sizeof (frdpContext); |
956 | +-#endif |
957 | + |
958 | + freerdp_context_new (priv->freerdp_session); |
959 | + ((frdpContext *) priv->freerdp_session->context)->rdp_tab = rdp_tab; |
960 | +@@ -1070,53 +1009,24 @@ init_freerdp (VinagreRdpTab *rdp_tab) |
961 | + settings = priv->freerdp_session->settings; |
962 | + |
963 | + /* Security settings */ |
964 | +-#if HAVE_FREERDP_1_1 |
965 | + settings->RdpSecurity = TRUE; |
966 | + settings->TlsSecurity = TRUE; |
967 | + settings->NlaSecurity = TRUE; |
968 | + settings->EncryptionMethods = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; |
969 | + settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; |
970 | +-#else |
971 | +- settings->rdp_security = true; |
972 | +- settings->tls_security = true; |
973 | +- settings->nla_security = true; |
974 | +- settings->encryption = true; |
975 | +- settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; |
976 | +- settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; |
977 | +-#endif |
978 | +-#include <freerdp/version.h> |
979 | +-#if (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2 && FREERDP_VERSION_REVISION >= 1) || (FREERDP_VERSION_MAJOR == 2) |
980 | + settings->UseRdpSecurityLayer = FALSE; |
981 | +-#else |
982 | +- settings->DisableEncryption = FALSE; |
983 | +-#endif |
984 | + |
985 | + /* Set display size */ |
986 | +-#if HAVE_FREERDP_1_1 |
987 | + settings->DesktopWidth = width; |
988 | + settings->DesktopHeight = height; |
989 | +-#else |
990 | +- settings->width = width; |
991 | +- settings->height = height; |
992 | +-#endif |
993 | + |
994 | + /* Set hostname */ |
995 | +-#if HAVE_FREERDP_1_1 |
996 | + settings->WindowTitle = g_strdup (hostname); |
997 | + settings->ServerHostname = g_strdup (hostname); |
998 | + settings->ServerPort = port; |
999 | +-#else |
1000 | +- settings->window_title = g_strdup (hostname); |
1001 | +- settings->hostname = g_strdup (hostname); |
1002 | +- settings->port = port; |
1003 | +-#endif |
1004 | + |
1005 | + /* Set keyboard layout */ |
1006 | +-#if HAVE_FREERDP_1_1 |
1007 | + freerdp_keyboard_init (KBD_US); |
1008 | +-#else |
1009 | +- freerdp_kbd_init (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), KBD_US); |
1010 | +-#endif |
1011 | + |
1012 | + /* Allow font smoothing by default */ |
1013 | + settings->AllowFontSmoothing = TRUE; |
1014 | +-- |
1015 | +2.26.2 |
1016 | + |
1017 | diff --git a/debian/patches/freerdp2017.patch b/debian/patches/freerdp3.patch |
1018 | similarity index 69% |
1019 | rename from debian/patches/freerdp2017.patch |
1020 | rename to debian/patches/freerdp3.patch |
1021 | index b3d118a..596f42f 100644 |
1022 | --- a/debian/patches/freerdp2017.patch |
1023 | +++ b/debian/patches/freerdp3.patch |
1024 | @@ -1,37 +1,37 @@ |
1025 | -Description: Build with freerdp2 |
1026 | +From 9d52ad6384ad3ca34a2b32b71fd8c4cbbdbbba42 Mon Sep 17 00:00:00 2001 |
1027 | +From: Ondrej Holy <oholy@redhat.com> |
1028 | +Date: Thu, 7 Feb 2019 16:26:33 +0100 |
1029 | +Subject: [PATCH] Fix build with freerdp master |
1030 | |
1031 | -https://bugzilla.gnome.org/show_bug.cgi?id=765444 |
1032 | - |
1033 | -https://git.archlinux.org/svntogit/packages.git/tree/trunk/freerdp2017.diff?h=packages/vinagre |
1034 | +FreeRDP 1.2 has never been officially released and is superseded by |
1035 | +2.0 version. Let's bump the dependency to freerdp2 module and update |
1036 | +the codes accordingly. |
1037 | |
1038 | +Closes: https://gitlab.gnome.org/GNOME/vinagre/issues/4 |
1039 | --- |
1040 | - configure.ac | 4 +-- |
1041 | - plugins/rdp/vinagre-rdp-tab.c | 45 ++++++++++++++++++++---------------------- |
1042 | - 2 files changed, 24 insertions(+), 25 deletions(-) |
1043 | + configure.ac | 3 ++- |
1044 | + plugins/rdp/vinagre-rdp-tab.c | 43 +++++++++++++++++++++-------------- |
1045 | + 2 files changed, 28 insertions(+), 18 deletions(-) |
1046 | |
1047 | +diff --git a/configure.ac b/configure.ac |
1048 | +index 2e9f2e1..61617f1 100644 |
1049 | --- a/configure.ac |
1050 | +++ b/configure.ac |
1051 | -@@ -58,7 +58,7 @@ AS_IF([test "x$have_ssh" = "xyes"], |
1052 | +@@ -58,7 +58,8 @@ AS_IF([test "x$have_ssh" = "xyes"], |
1053 | AM_CONDITIONAL([VINAGRE_ENABLE_SSH], [test "x$have_ssh" = "xyes"]) |
1054 | |
1055 | # Whether to enable support for RDP. |
1056 | -RDP_DEPS="freerdp x11" |
1057 | +RDP_DEPS="freerdp2 x11" |
1058 | ++ |
1059 | AC_ARG_ENABLE([rdp], |
1060 | [AS_HELP_STRING([--disable-rdp], |
1061 | [Disable Remote Desktop Protocol (RDP) support])]) |
1062 | -@@ -66,7 +66,7 @@ AC_ARG_ENABLE([rdp], |
1063 | - AS_IF([test "x$enable_rdp" != "xno"], |
1064 | - [PKG_CHECK_EXISTS([$RDP_DEPS], |
1065 | - [have_rdp=yes |
1066 | -- PKG_CHECK_EXISTS(freerdp >= 1.1, |
1067 | -+ PKG_CHECK_EXISTS(freerdp2 >= 1.1, |
1068 | - [AC_DEFINE([HAVE_FREERDP_1_1], [1], [FreeRDP is of version 1.1 or newer])], [])], |
1069 | - [have_rdp=no])], |
1070 | - [have_rdp=no]) |
1071 | +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
1072 | +index 027866a..dcc291d 100644 |
1073 | --- a/plugins/rdp/vinagre-rdp-tab.c |
1074 | +++ b/plugins/rdp/vinagre-rdp-tab.c |
1075 | -@@ -474,16 +474,17 @@ frdp_drawing_area_draw (GtkWidget *area, |
1076 | +@@ -465,16 +465,18 @@ frdp_drawing_area_draw (GtkWidget *area, |
1077 | return TRUE; |
1078 | } |
1079 | |
1080 | @@ -43,6 +43,7 @@ https://git.archlinux.org/svntogit/packages.git/tree/trunk/freerdp2017.diff?h=pa |
1081 | |
1082 | gdi->primary->hdc->hwnd->invalid->null = 1; |
1083 | gdi->primary->hdc->hwnd->ninvalid = 0; |
1084 | ++ |
1085 | + return TRUE; |
1086 | } |
1087 | |
1088 | @@ -51,7 +52,7 @@ https://git.archlinux.org/svntogit/packages.git/tree/trunk/freerdp2017.diff?h=pa |
1089 | frdp_end_paint (rdpContext *context) |
1090 | { |
1091 | VinagreRdpTab *rdp_tab = ((frdpContext *) context)->rdp_tab; |
1092 | -@@ -493,7 +494,7 @@ frdp_end_paint (rdpContext *context) |
1093 | +@@ -484,7 +486,7 @@ frdp_end_paint (rdpContext *context) |
1094 | gint x, y, w, h; |
1095 | |
1096 | if (gdi->primary->hdc->hwnd->invalid->null) |
1097 | @@ -60,33 +61,26 @@ https://git.archlinux.org/svntogit/packages.git/tree/trunk/freerdp2017.diff?h=pa |
1098 | |
1099 | x = gdi->primary->hdc->hwnd->invalid->x; |
1100 | y = gdi->primary->hdc->hwnd->invalid->y; |
1101 | -@@ -515,6 +516,7 @@ frdp_end_paint (rdpContext *context) |
1102 | +@@ -506,6 +508,8 @@ frdp_end_paint (rdpContext *context) |
1103 | { |
1104 | gtk_widget_queue_draw_area (priv->display, x, y, w, h); |
1105 | } |
1106 | ++ |
1107 | + return TRUE; |
1108 | } |
1109 | |
1110 | static BOOL |
1111 | -@@ -585,15 +587,7 @@ frdp_post_connect (freerdp *instance) |
1112 | +@@ -549,7 +553,7 @@ frdp_post_connect (freerdp *instance) |
1113 | rdpGdi *gdi; |
1114 | int stride; |
1115 | |
1116 | -- gdi_init (instance, |
1117 | --#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \ |
1118 | -- !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && \ |
1119 | -- FREERDP_VERSION_MINOR >= 2)) |
1120 | -- CLRBUF_24BPP, |
1121 | --#else |
1122 | -- CLRBUF_32BPP, |
1123 | --#endif |
1124 | -- NULL); |
1125 | +- gdi_init (instance, CLRBUF_32BPP, NULL); |
1126 | + gdi_init (instance, PIXEL_FORMAT_BGRA32); |
1127 | gdi = instance->context->gdi; |
1128 | |
1129 | instance->update->BeginPaint = frdp_begin_paint; |
1130 | -@@ -969,11 +963,13 @@ frdp_authenticate (freerdp *instance, |
1131 | - } |
1132 | +@@ -882,11 +886,13 @@ frdp_authenticate (freerdp *instance, |
1133 | + return TRUE; |
1134 | } |
1135 | |
1136 | -static BOOL |
1137 | @@ -103,16 +97,21 @@ https://git.archlinux.org/svntogit/packages.git/tree/trunk/freerdp2017.diff?h=pa |
1138 | { |
1139 | VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); |
1140 | GtkBuilder *builder; |
1141 | -@@ -1003,17 +999,20 @@ frdp_certificate_verify (freerdp *instan |
1142 | - gtk_widget_hide (dialog); |
1143 | +@@ -911,21 +917,24 @@ frdp_certificate_verify (freerdp *instance, |
1144 | + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_fingerprint")); |
1145 | + gtk_label_set_text (GTK_LABEL (widget), fingerprint); |
1146 | + |
1147 | ++ /* FIXME: Pass host_mismatch to user. */ |
1148 | |
1149 | + response = gtk_dialog_run (GTK_DIALOG (dialog)); |
1150 | + gtk_widget_hide (dialog); |
1151 | |
1152 | +- |
1153 | - return response == GTK_RESPONSE_YES; |
1154 | + return (response == GTK_RESPONSE_YES) ? 1 : 0; |
1155 | } |
1156 | |
1157 | |
1158 | - #if HAVE_FREERDP_1_1 |
1159 | -static BOOL |
1160 | +static DWORD |
1161 | frdp_changed_certificate_verify (freerdp *instance, |
1162 | @@ -130,12 +129,21 @@ https://git.archlinux.org/svntogit/packages.git/tree/trunk/freerdp2017.diff?h=pa |
1163 | { |
1164 | VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance->context)->rdp_tab); |
1165 | GtkBuilder *builder; |
1166 | -@@ -1058,7 +1057,7 @@ frdp_changed_certificate_verify (freerdp |
1167 | - gtk_widget_hide (dialog); |
1168 | +@@ -965,12 +974,12 @@ frdp_changed_certificate_verify (freerdp *instance, |
1169 | + gtk_widget_hide (label); |
1170 | + } |
1171 | |
1172 | ++ /* FIXME: Pass old_subject and old_issuer to user. */ |
1173 | |
1174 | + response = gtk_dialog_run (GTK_DIALOG (dialog)); |
1175 | + gtk_widget_hide (dialog); |
1176 | + |
1177 | +- |
1178 | - return response == GTK_RESPONSE_YES; |
1179 | + return (response == GTK_RESPONSE_YES) ? 1 : 0; |
1180 | } |
1181 | - #endif |
1182 | |
1183 | + static void |
1184 | +-- |
1185 | +2.26.2 |
1186 | + |
1187 | diff --git a/debian/patches/freerdp4.patch b/debian/patches/freerdp4.patch |
1188 | new file mode 100644 |
1189 | index 0000000..d5e0320 |
1190 | --- /dev/null |
1191 | +++ b/debian/patches/freerdp4.patch |
1192 | @@ -0,0 +1,203 @@ |
1193 | +From 1790370c3c2765076077e8b36a19543698e27172 Mon Sep 17 00:00:00 2001 |
1194 | +From: Ondrej Holy <oholy@redhat.com> |
1195 | +Date: Thu, 7 Feb 2019 17:16:33 +0100 |
1196 | +Subject: [PATCH] Pass new certificate info to user |
1197 | + |
1198 | +The freerdp2 certificate callbacks contain more parameters. Let's |
1199 | +pass some of them to user also. |
1200 | +--- |
1201 | + data/vinagre.ui | 80 ++++++++++++++++++++++++++++++----- |
1202 | + plugins/rdp/vinagre-rdp-tab.c | 26 ++++-------- |
1203 | + 2 files changed, 79 insertions(+), 27 deletions(-) |
1204 | + |
1205 | +diff --git a/data/vinagre.ui b/data/vinagre.ui |
1206 | +index 3135336..d7ce258 100644 |
1207 | +--- a/data/vinagre.ui |
1208 | ++++ b/data/vinagre.ui |
1209 | +@@ -885,7 +885,7 @@ Do you trust the new certificate?</property> |
1210 | + <property name="vexpand">True</property> |
1211 | + <property name="xalign">0</property> |
1212 | + <property name="xpad">12</property> |
1213 | +- <property name="label" translatable="yes" comments="Subject of the certificate.">Subject:</property> |
1214 | ++ <property name="label" translatable="yes" comments="Subject of the certificate.">New subject:</property> |
1215 | + </object> |
1216 | + <packing> |
1217 | + <property name="left_attach">0</property> |
1218 | +@@ -901,7 +901,7 @@ Do you trust the new certificate?</property> |
1219 | + <property name="vexpand">True</property> |
1220 | + <property name="xalign">0</property> |
1221 | + <property name="xpad">12</property> |
1222 | +- <property name="label" translatable="yes" comments="Issuer of the certificate.">Issuer:</property> |
1223 | ++ <property name="label" translatable="yes" comments="Issuer of the certificate.">New issuer:</property> |
1224 | + </object> |
1225 | + <packing> |
1226 | + <property name="left_attach">0</property> |
1227 | +@@ -927,7 +927,55 @@ Do you trust the new certificate?</property> |
1228 | + </packing> |
1229 | + </child> |
1230 | + <child> |
1231 | +- <object class="GtkLabel" id="certificate_changed_subject"> |
1232 | ++ <object class="GtkLabel"> |
1233 | ++ <property name="visible">True</property> |
1234 | ++ <property name="can_focus">False</property> |
1235 | ++ <property name="vexpand">True</property> |
1236 | ++ <property name="xalign">0</property> |
1237 | ++ <property name="xpad">12</property> |
1238 | ++ <property name="label" translatable="yes" comments="Subject of the old certificate.">Old subject:</property> |
1239 | ++ </object> |
1240 | ++ <packing> |
1241 | ++ <property name="left_attach">0</property> |
1242 | ++ <property name="top_attach">3</property> |
1243 | ++ <property name="width">1</property> |
1244 | ++ <property name="height">1</property> |
1245 | ++ </packing> |
1246 | ++ </child> |
1247 | ++ <child> |
1248 | ++ <object class="GtkLabel"> |
1249 | ++ <property name="visible">True</property> |
1250 | ++ <property name="can_focus">False</property> |
1251 | ++ <property name="vexpand">True</property> |
1252 | ++ <property name="xalign">0</property> |
1253 | ++ <property name="xpad">12</property> |
1254 | ++ <property name="label" translatable="yes" comments="Issuer of the old certificate.">Old issuer:</property> |
1255 | ++ </object> |
1256 | ++ <packing> |
1257 | ++ <property name="left_attach">0</property> |
1258 | ++ <property name="top_attach">4</property> |
1259 | ++ <property name="width">1</property> |
1260 | ++ <property name="height">1</property> |
1261 | ++ </packing> |
1262 | ++ </child> |
1263 | ++ <child> |
1264 | ++ <object class="GtkLabel"> |
1265 | ++ <property name="visible">True</property> |
1266 | ++ <property name="can_focus">False</property> |
1267 | ++ <property name="vexpand">True</property> |
1268 | ++ <property name="xalign">0</property> |
1269 | ++ <property name="xpad">12</property> |
1270 | ++ <property name="label" translatable="yes" comments="Fingerprint of the old certificate.">Old fingerprint:</property> |
1271 | ++ </object> |
1272 | ++ <packing> |
1273 | ++ <property name="left_attach">0</property> |
1274 | ++ <property name="top_attach">5</property> |
1275 | ++ <property name="width">1</property> |
1276 | ++ <property name="height">1</property> |
1277 | ++ </packing> |
1278 | ++ </child> |
1279 | ++ <child> |
1280 | ++ <object class="GtkLabel" id="certificate_changed_new_subject"> |
1281 | + <property name="visible">True</property> |
1282 | + <property name="can_focus">False</property> |
1283 | + <property name="hexpand">True</property> |
1284 | +@@ -942,7 +990,7 @@ Do you trust the new certificate?</property> |
1285 | + </packing> |
1286 | + </child> |
1287 | + <child> |
1288 | +- <object class="GtkLabel" id="certificate_changed_issuer"> |
1289 | ++ <object class="GtkLabel" id="certificate_changed_new_issuer"> |
1290 | + <property name="visible">True</property> |
1291 | + <property name="can_focus">False</property> |
1292 | + <property name="hexpand">True</property> |
1293 | +@@ -972,21 +1020,33 @@ Do you trust the new certificate?</property> |
1294 | + </packing> |
1295 | + </child> |
1296 | + <child> |
1297 | +- <object class="GtkLabel" id="certificate_changed_old_fingerprint_label"> |
1298 | ++ <object class="GtkLabel" id="certificate_changed_old_subject"> |
1299 | + <property name="visible">True</property> |
1300 | + <property name="can_focus">False</property> |
1301 | +- <property name="vexpand">True</property> |
1302 | ++ <property name="hexpand">True</property> |
1303 | + <property name="xalign">0</property> |
1304 | +- <property name="xpad">12</property> |
1305 | +- <property name="label" translatable="yes" comments="Fingerprint of the old certificate.">Old fingerprint:</property> |
1306 | + </object> |
1307 | + <packing> |
1308 | +- <property name="left_attach">0</property> |
1309 | ++ <property name="left_attach">1</property> |
1310 | + <property name="top_attach">3</property> |
1311 | + <property name="width">1</property> |
1312 | + <property name="height">1</property> |
1313 | + </packing> |
1314 | + </child> |
1315 | ++ <child> |
1316 | ++ <object class="GtkLabel" id="certificate_changed_old_issuer"> |
1317 | ++ <property name="visible">True</property> |
1318 | ++ <property name="can_focus">False</property> |
1319 | ++ <property name="hexpand">True</property> |
1320 | ++ <property name="xalign">0</property> |
1321 | ++ </object> |
1322 | ++ <packing> |
1323 | ++ <property name="left_attach">1</property> |
1324 | ++ <property name="top_attach">4</property> |
1325 | ++ <property name="width">1</property> |
1326 | ++ <property name="height">1</property> |
1327 | ++ </packing> |
1328 | ++ </child> |
1329 | + <child> |
1330 | + <object class="GtkLabel" id="certificate_changed_old_fingerprint"> |
1331 | + <property name="visible">True</property> |
1332 | +@@ -997,7 +1057,7 @@ Do you trust the new certificate?</property> |
1333 | + </object> |
1334 | + <packing> |
1335 | + <property name="left_attach">1</property> |
1336 | +- <property name="top_attach">3</property> |
1337 | ++ <property name="top_attach">5</property> |
1338 | + <property name="width">1</property> |
1339 | + <property name="height">1</property> |
1340 | + </packing> |
1341 | +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
1342 | +index dcc291d..4e0f937 100644 |
1343 | +--- a/plugins/rdp/vinagre-rdp-tab.c |
1344 | ++++ b/plugins/rdp/vinagre-rdp-tab.c |
1345 | +@@ -940,7 +940,6 @@ frdp_changed_certificate_verify (freerdp *instance, |
1346 | + GtkBuilder *builder; |
1347 | + GtkWidget *dialog; |
1348 | + GtkWidget *widget; |
1349 | +- GtkWidget *label; |
1350 | + gint response; |
1351 | + |
1352 | + builder = vinagre_utils_get_builder (); |
1353 | +@@ -951,30 +950,23 @@ frdp_changed_certificate_verify (freerdp *instance, |
1354 | + _("Connect"), GTK_RESPONSE_YES, NULL); |
1355 | + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES); |
1356 | + |
1357 | +- widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_subject")); |
1358 | ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_subject")); |
1359 | + gtk_label_set_text (GTK_LABEL (widget), subject); |
1360 | + |
1361 | +- widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_issuer")); |
1362 | ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_issuer")); |
1363 | + gtk_label_set_text (GTK_LABEL (widget), issuer); |
1364 | + |
1365 | + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_fingerprint")); |
1366 | + gtk_label_set_text (GTK_LABEL (widget), new_fingerprint); |
1367 | + |
1368 | +- widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint")); |
1369 | +- label = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint_label")); |
1370 | +- if (old_fingerprint != NULL && old_fingerprint[0] != '\0') |
1371 | +- { |
1372 | +- gtk_label_set_text (GTK_LABEL (widget), old_fingerprint); |
1373 | +- gtk_widget_show (widget); |
1374 | +- gtk_widget_show (label); |
1375 | +- } |
1376 | +- else |
1377 | +- { |
1378 | +- gtk_widget_hide (widget); |
1379 | +- gtk_widget_hide (label); |
1380 | +- } |
1381 | ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_subject")); |
1382 | ++ gtk_label_set_text (GTK_LABEL (widget), old_subject); |
1383 | + |
1384 | +- /* FIXME: Pass old_subject and old_issuer to user. */ |
1385 | ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_issuer")); |
1386 | ++ gtk_label_set_text (GTK_LABEL (widget), old_issuer); |
1387 | ++ |
1388 | ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint")); |
1389 | ++ gtk_label_set_text (GTK_LABEL (widget), old_fingerprint); |
1390 | + |
1391 | + response = gtk_dialog_run (GTK_DIALOG (dialog)); |
1392 | + gtk_widget_hide (dialog); |
1393 | +-- |
1394 | +2.26.2 |
1395 | + |
1396 | diff --git a/debian/patches/freerdp5.patch b/debian/patches/freerdp5.patch |
1397 | new file mode 100644 |
1398 | index 0000000..530ede6 |
1399 | --- /dev/null |
1400 | +++ b/debian/patches/freerdp5.patch |
1401 | @@ -0,0 +1,49 @@ |
1402 | +From 81f235f9bdb0e46f362e14811fbe83759232ba37 Mon Sep 17 00:00:00 2001 |
1403 | +From: Ondrej Holy <oholy@redhat.com> |
1404 | +Date: Fri, 8 Feb 2019 10:25:20 +0100 |
1405 | +Subject: [PATCH] Fix crashes when certificate is not accepted |
1406 | + |
1407 | +Vinagre crashes if the certificate is not accepted by user, because |
1408 | +`emit_delayed_signal` is invoked after the rdp tab disposal. Let's |
1409 | +remove the idle source during disposal to prevent the crash. |
1410 | +--- |
1411 | + plugins/rdp/vinagre-rdp-tab.c | 9 ++++++++- |
1412 | + 1 file changed, 8 insertions(+), 1 deletion(-) |
1413 | + |
1414 | +diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c |
1415 | +index 4e0f937..bbb8adf 100644 |
1416 | +--- a/plugins/rdp/vinagre-rdp-tab.c |
1417 | ++++ b/plugins/rdp/vinagre-rdp-tab.c |
1418 | +@@ -46,6 +46,7 @@ struct _VinagreRdpTabPrivate |
1419 | + cairo_surface_t *surface; |
1420 | + GQueue *events; |
1421 | + |
1422 | ++ guint intialized_id; |
1423 | + guint update_id; |
1424 | + guint button_press_handler_id; |
1425 | + guint button_release_handler_id; |
1426 | +@@ -181,6 +182,12 @@ vinagre_rdp_tab_dispose (GObject *object) |
1427 | + g_clear_pointer (&priv->events, g_queue_free); |
1428 | + } |
1429 | + |
1430 | ++ if (priv->intialized_id > 0) |
1431 | ++ { |
1432 | ++ g_source_remove (rdp_tab->priv->intialized_id); |
1433 | ++ rdp_tab->priv->intialized_id = 0; |
1434 | ++ } |
1435 | ++ |
1436 | + if (priv->update_id > 0) |
1437 | + { |
1438 | + g_source_remove (rdp_tab->priv->update_id); |
1439 | +@@ -239,7 +246,7 @@ vinagre_rdp_tab_constructed (GObject *object) |
1440 | + setup_toolbar (rdp_tab); |
1441 | + open_freerdp (rdp_tab); |
1442 | + |
1443 | +- g_idle_add ((GSourceFunc) emit_delayed_signal, object); |
1444 | ++ rdp_tab->priv->intialized_id = g_idle_add ((GSourceFunc) emit_delayed_signal, object); |
1445 | + } |
1446 | + |
1447 | + static void |
1448 | +-- |
1449 | +2.26.2 |
1450 | + |
1451 | diff --git a/debian/patches/series b/debian/patches/series |
1452 | index d5ad6c5..d644cc1 100644 |
1453 | --- a/debian/patches/series |
1454 | +++ b/debian/patches/series |
1455 | @@ -1,7 +1,9 @@ |
1456 | -0001-Revert-Improve-FreeRDP-authentication-failure-handli.patch |
1457 | -0002-Revert-Store-credentials-for-RDP.patch |
1458 | -freerdp2017.patch |
1459 | 131d151cb02245f84918f9ba5b3ef055758bcf61.patch |
1460 | +freerdp1.patch |
1461 | +freerdp2.patch |
1462 | +freerdp3.patch |
1463 | +freerdp4.patch |
1464 | +freerdp5.patch |
1465 | gcc-10.patch |
1466 | 0003-fix-hangs-with-recent-FreeRDP-version.patch |
1467 | 0004-fix-FreeRDP-API-usage.patch |
Please send the delta up to Debian