NetBSD Problem Report #54857

From mp@petermann-it.de  Tue Jan 14 02:02:48 2020
Return-Path: <mp@petermann-it.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2F4517A15D
	for <gnats-bugs@gnats.netbsd.org>; Tue, 14 Jan 2020 02:02:47 +0000 (UTC)
Message-Id: <1578970881.633762.22386@x230Mk4.local>
Date: Tue, 14 Jan 2020 04:01:21 +0100
From: "Matthias Petermann" <mp@petermann-it.de>
To: "gnats bugs" <gnats-bugs@gnats.netbsd.org>
Cc: matthias@d2ux.net
Subject: net/rdesktop update to version 1.9.0 (fixes freeze on packet loss)
X-Send-Pr-Version: gtk-send-pr 0.4.9 
X-GNATS-Notify:

>Number:         54857
>Category:       pkg
>Synopsis:       net/rdesktop update to version 1.9.0 (fixes freeze on packet loss)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 14 02:05:00 +0000 2020
>Closed-Date:    Wed Jan 15 15:31:55 +0000 2020
>Last-Modified:  Wed Jan 15 15:35:01 +0000 2020
>Originator:     Matthias Petermann
>Release:        NetBSD 9.0_RC1 amd64
>Organization:
>Environment:


System: NetBSD 9.0_RC1 (CUSTOM) #0: Wed Jan  8 13:48:21 CET 2020
	mpeterma@x230Mk4.local:/usr/src/sys/arch/amd64/compile/CUSTOM



>Description:


Version 1.8.4 contains a bug which, in the event of packet loss, causes the entire desktop to freeze (not just the desktop within the desktop session). Therefore I would like to ask you to update to version 1.9.0. In this version, the behavior is at least improved so that the rdesktop window can now be closed via the window manager when freezing occurs.

Details can be found at https://github.com/rdesktop/rdesktop/issues/17.


>How-To-Repeat:


When using rdesktop over VPN connections with high latency I noticed the problem particularly often.


>Fix:


--- patch_net_rdesktop.txt begins here ---
diff -ruN rdesktop.old/Makefile rdesktop/Makefile
--- rdesktop.old/Makefile	2020-01-08 14:36:50.738668702 +0100
+++ rdesktop/Makefile	2020-01-08 14:59:23.064196391 +0100
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.49 2019/03/25 19:56:08 markd Exp $

-DISTNAME=		rdesktop-1.8.4
+DISTNAME=		rdesktop-1.9.0
 PKGREVISION=		1
 CATEGORIES=		net
 MASTER_SITES=		${MASTER_SITE_GITHUB:=rdesktop/}
@@ -36,6 +36,9 @@
 .endif

 .include "../../audio/libsamplerate/buildlink3.mk"
+.include "../../security/libtasn1/buildlink3.mk"
+.include "../../security/nettle/buildlink3.mk"
+.include "../../security/gnutls/buildlink3.mk"
 .include "../../mk/oss.buildlink3.mk"
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
diff -ruN rdesktop.old/distinfo rdesktop/distinfo
--- rdesktop.old/distinfo	2020-01-08 14:36:50.738902657 +0100
+++ rdesktop/distinfo	2020-01-14 03:40:29.926548101 +0100
@@ -1,8 +1,8 @@
 $NetBSD: distinfo,v 1.26 2019/03/25 19:56:08 markd Exp $

-SHA1 (rdesktop-1.8.4.tar.gz) = b937573e3f76a494a2b9092a440c9ea3e862d1f3
-RMD160 (rdesktop-1.8.4.tar.gz) = 5ad95433c369a9cff11b765e181d97ac41bf8582
-SHA512 (rdesktop-1.8.4.tar.gz) = 9e4f6723eb0baab31ad11f1c5c29a4753c655386c2381d01646b7834c959ffc2ec1e0c2f3f73626255aa018889709758d97387c7563da98bb1b7f269610929ae
-Size (rdesktop-1.8.4.tar.gz) = 321448 bytes
-SHA1 (patch-aa) = a56f15d51e32b3e53fd1e42736944a6805cbe9e0
-SHA1 (patch-ssl.c) = 491b8d8dc8b39d013469fc803177d8163dd42fa3
+SHA1 (rdesktop-1.9.0.tar.gz) = cbd6a4dab1f0638fe30354c0d081133562d2ca62
+RMD160 (rdesktop-1.9.0.tar.gz) = a403d660585dc4f8433ea885359e4452148a2c98
+SHA512 (rdesktop-1.9.0.tar.gz) = e101147b496ae70118c2756bf120007d4748aad9d9917d9ebc0878ffaf35764500861c548ef0528722777555c78e1d3d146b6f3691daa2b8657b0d3a541094f5
+Size (rdesktop-1.9.0.tar.gz) = 368980 bytes
+SHA1 (patch-Makefile.in) = 46cec50c90b5e7aff2ae0f3f02df7b7a5b709f0a
+SHA1 (patch-xwin.c) = 1910b5e237c66961061ef5a2e7404ad22444cee8
diff -ruN rdesktop.old/patches/patch-Makefile.in rdesktop/patches/patch-Makefile.in
--- rdesktop.old/patches/patch-Makefile.in	1970-01-01 01:00:00.000000000 +0100
+++ rdesktop/patches/patch-Makefile.in	2020-01-14 03:38:48.126100856 +0100
@@ -0,0 +1,40 @@
+$NetBSD$
+
+Use BSD_INSTALL_foo
+
+--- Makefile.in.orig	2019-06-13 12:10:15.000000000 +0000
++++ Makefile.in
+@@ -39,25 +39,21 @@ install: installbin installkeymaps insta
+ 
+ .PHONY: installbin
+ installbin: rdesktop
+-	mkdir -p $(DESTDIR)$(bindir)
+-	$(INSTALL) rdesktop $(DESTDIR)$(bindir)
+-	$(STRIP) $(DESTDIR)$(bindir)/rdesktop
+-	chmod 755 $(DESTDIR)$(bindir)/rdesktop
++	$(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(bindir)
++	$(BSD_INSTALL_PROGRAM) rdesktop $(DESTDIR)$(bindir)
+ 
+ .PHONY: installman
+ installman: doc/rdesktop.1
+-	mkdir -p $(DESTDIR)$(mandir)/man1
+-	cp doc/rdesktop.1 $(DESTDIR)$(mandir)/man1
+-	chmod 644 $(DESTDIR)$(mandir)/man1/rdesktop.1
++	$(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(mandir)/man1
++	$(BSD_INSTALL_MAN) doc/rdesktop.1 $(DESTDIR)$(mandir)/man1
+ 
+ .PHONY: installkeymaps
+ installkeymaps:
+-	mkdir -p $(DESTDIR)$(KEYMAP_PATH)
++	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(KEYMAP_PATH)
+ # Prevent copying the CVS directory
+-	cp keymaps/?? keymaps/??-?? keymaps/??-??-???? $(DESTDIR)$(KEYMAP_PATH)
+-	cp keymaps/common $(DESTDIR)$(KEYMAP_PATH)
+-	cp keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
+-	chmod 644 $(DESTDIR)$(KEYMAP_PATH)/*
++	$(BSD_INSTALL_DATA) keymaps/?? keymaps/??-?? $(DESTDIR)$(KEYMAP_PATH)
++	$(BSD_INSTALL_DATA) keymaps/common $(DESTDIR)$(KEYMAP_PATH)
++	$(BSD_INSTALL_DATA) keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
+ 
+ .PHONY: clean
+ clean:
diff -ruN rdesktop.old/patches/patch-aa rdesktop/patches/patch-aa
--- rdesktop.old/patches/patch-aa	2020-01-08 14:36:50.740339137 +0100
+++ rdesktop/patches/patch-aa	1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-$NetBSD: patch-aa,v 1.12 2012/04/26 14:54:29 abs Exp $
-
-Use BSD_INSTALL_foo
-
---- Makefile.in.orig	2006-04-09 20:27:50.000000000 +0200
-+++ Makefile.in
-@@ -55,25 +55,21 @@ install: installbin installkeymaps insta
- 
- .PHONY: installbin
- installbin: rdesktop
--	mkdir -p $(DESTDIR)$(bindir)
--	$(INSTALL) rdesktop $(DESTDIR)$(bindir)
--	$(STRIP) $(DESTDIR)$(bindir)/rdesktop
--	chmod 755 $(DESTDIR)$(bindir)/rdesktop
-+	$(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(bindir)
-+	$(BSD_INSTALL_PROGRAM) rdesktop $(DESTDIR)$(bindir)
- 
- .PHONY: installman
- installman: doc/rdesktop.1
--	mkdir -p $(DESTDIR)$(mandir)/man1
--	cp doc/rdesktop.1 $(DESTDIR)$(mandir)/man1
--	chmod 644 $(DESTDIR)$(mandir)/man1/rdesktop.1
-+	$(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(mandir)/man1
-+	$(BSD_INSTALL_MAN) doc/rdesktop.1 $(DESTDIR)$(mandir)/man1
- 
- .PHONY: installkeymaps
- installkeymaps:
--	mkdir -p $(DESTDIR)$(KEYMAP_PATH)
-+	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(KEYMAP_PATH)
- # Prevent copying the CVS directory
--	cp keymaps/?? keymaps/??-?? $(DESTDIR)$(KEYMAP_PATH)
--	cp keymaps/common $(DESTDIR)$(KEYMAP_PATH)
--	cp keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
--	chmod 644 $(DESTDIR)$(KEYMAP_PATH)/*
-+	$(BSD_INSTALL_DATA) keymaps/?? keymaps/??-?? $(DESTDIR)$(KEYMAP_PATH)
-+	$(BSD_INSTALL_DATA) keymaps/common $(DESTDIR)$(KEYMAP_PATH)
-+	$(BSD_INSTALL_DATA) keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
- 
- .PHONY: proto
- proto:
diff -ruN rdesktop.old/patches/patch-ssl.c rdesktop/patches/patch-ssl.c
--- rdesktop.old/patches/patch-ssl.c	2020-01-08 14:36:50.740504347 +0100
+++ rdesktop/patches/patch-ssl.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,57 +0,0 @@
-$NetBSD: patch-ssl.c,v 1.1 2019/03/25 19:56:08 markd Exp $
-
-Workaround for key caching in OpenSSL > 1.1.0 ( fixes #118)
-commit bba4cd2cf0269ec933cb2ccf92743bbcebf3c2da
-
---- ssl.c.orig	2019-01-02 13:50:34.000000000 +0000
-+++ ssl.c
-@@ -143,6 +143,11 @@ rdssl_cert_to_rkey(RDSSL_CERT * cert, ui
- 	int nid;
- 	int ret;
- 
-+	const unsigned char *p;
-+	int pklen;
-+
-+	RSA *rsa = NULL;
-+
- 	/* By some reason, Microsoft sets the OID of the Public RSA key to
- 	   the oid for "MD5 with RSA Encryption" instead of "RSA Encryption"
- 
-@@ -170,9 +175,28 @@ rdssl_cert_to_rkey(RDSSL_CERT * cert, ui
- 
- 	if ((nid == NID_md5WithRSAEncryption) || (nid == NID_shaWithRSAEncryption))
- 	{
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- 		DEBUG_RDP5(("Re-setting algorithm type to RSA in server certificate\n"));
- 		X509_PUBKEY_set0_param(key, OBJ_nid2obj(NID_rsaEncryption),
- 				       0, NULL, NULL, 0);
-+#else
-+		if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, NULL, key)) {
-+			error("failed to get algorithm used for public key");
-+
-+			return NULL;
-+		}
-+
-+		if (!(rsa = d2i_RSAPublicKey(NULL, &p, pklen))) {
-+			error("failed to extract public key from certificate");
-+
-+			return NULL;
-+		}
-+
-+		lkey = RSAPublicKey_dup(rsa);
-+		*key_len = RSA_size(lkey);
-+		return lkey;
-+#endif
-+
- 	}
- 	epk = X509_get_pubkey(cert);
- 	if (NULL == epk)
-@@ -229,7 +255,7 @@ rdssl_rkey_get_exp_mod(RDSSL_RKEY * rkey
- 	e = rkey->e;
- 	n = rkey->n;
- #else
--	RSA_get0_key(rkey, &e, &n, NULL);
-+	RSA_get0_key(rkey, &n, &e, NULL);
- #endif
- 
- 	if ((BN_num_bytes(e) > (int) max_exp_len) ||
diff -ruN rdesktop.old/patches/patch-xwin.c rdesktop/patches/patch-xwin.c
--- rdesktop.old/patches/patch-xwin.c	1970-01-01 01:00:00.000000000 +0100
+++ rdesktop/patches/patch-xwin.c	2020-01-14 03:39:54.578048131 +0100
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Workaround for undefined HOST_NAME_MAX on BSD systems
+
+--- xwin.c.orig	2019-06-13 12:10:15.000000000 +0000
++++ xwin.c
+@@ -1887,7 +1887,7 @@ static void
+ set_wm_client_machine(Display * dpy, Window win)
+ {
+ 	XTextProperty tp;
+-	char hostname[HOST_NAME_MAX];
++	char hostname[sysconf(_SC_HOST_NAME_MAX)];
+ 
+ 	if (gethostname(hostname, sizeof(hostname)) != 0)
+ 		return;
--- patch_net_rdesktop.txt ends here ---



>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 15 Jan 2020 15:31:55 +0000
State-Changed-Why:
Committed, thanks!


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54857 CVS commit: pkgsrc/net/rdesktop
Date: Wed, 15 Jan 2020 15:31:28 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Wed Jan 15 15:31:28 UTC 2020

 Modified Files:
 	pkgsrc/net/rdesktop: Makefile distinfo
 Added Files:
 	pkgsrc/net/rdesktop/patches: patch-Makefile.in patch-xwin.c
 Removed Files:
 	pkgsrc/net/rdesktop/patches: patch-aa patch-ssl.c

 Log Message:
 rdesktop: update to 1.9.0.

 Provided by Matthias Petermann in PR 54857.

 Additionally, remove ssl option per 1.9.0 changelog.

 rdesktop (1.9.0)
   * Use GnuTLS and nettle instead of OpenSSL
   * Improved certificate handling
   * Add support for dynamic resize of sessions
   * Add support for alpha cursors
   * Add PulseAudio support
   * Add Kerberos support on macOS
   * Kerberos support no longer requires libgssglue
   * Remove support for rdesktop's custom microphone extension
   * Several fixes to improve compatibility with modern desktops
   * macOS compatibility fixes
   * Improved handling of redirections
   * Many smart card bug fixes
   * Many disk redirection bug fixes
   * Improved logging
   * Lots of other small bug fixes

   -- Pierre Ossman <ossman@cendio.se> 2019-09-18

 rdesktop (1.8.6)
   * Fix protocol code handling new licenses

   -- Pierre Ossman <ossman@cendio.se> 2019-05-16

 rdesktop (1.8.5)
   * Add bounds checking to protocol handling in order to fix many
     security problems when communicating with a malicious server.

   -- Pierre Ossman <ossman@cendio.se> 2019-05-08


 To generate a diff of this commit:
 cvs rdiff -u -r1.49 -r1.50 pkgsrc/net/rdesktop/Makefile
 cvs rdiff -u -r1.26 -r1.27 pkgsrc/net/rdesktop/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/net/rdesktop/patches/patch-Makefile.in \
     pkgsrc/net/rdesktop/patches/patch-xwin.c
 cvs rdiff -u -r1.12 -r0 pkgsrc/net/rdesktop/patches/patch-aa
 cvs rdiff -u -r1.1 -r0 pkgsrc/net/rdesktop/patches/patch-ssl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.