--- rdesktop-1.6.0.orig/debian/docs +++ rdesktop-1.6.0/debian/docs @@ -0,0 +1,9 @@ +doc/AUTHORS +doc/HACKING +doc/TODO +doc/ipv6.txt +doc/keymap-names.txt +doc/keymapping.txt +doc/licensing.txt +doc/patches.txt +doc/redirection.txt --- rdesktop-1.6.0.orig/debian/copyright +++ rdesktop-1.6.0/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Sam Johnston on +Wed, 27 Jun 2001 00:52:32 +1000. +Adopted by Laszlo Boszormenyi (GCS) on +Tue Oct 17 23:37:49 CEST 2006 from Tomas Fasth . + +It was downloaded from http://www.rdesktop.org + +Upstream Author: Matthew Chapman + +Copyright: + + Copyright (C) Matthew Chapman 1999-2000 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version, with the additional exemption that + compiling, linking, and/or using OpenSSL together with this software is + allowed. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General Public +License can be found in the `/usr/share/common-licenses' directory. + --- rdesktop-1.6.0.orig/debian/control +++ rdesktop-1.6.0/debian/control @@ -0,0 +1,17 @@ +Source: rdesktop +Section: x11 +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) +Build-Depends: debhelper (>= 6.0.0), dpatch (>= 2.0.9), pkg-config, autotools-dev, libasound2-dev, libxt-dev, libx11-dev, libssl-dev, libsamplerate-dev +Standards-Version: 3.8.2 + +Package: rdesktop +Architecture: any +Depends: ${shlibs:Depends} +Description: RDP client for Windows NT/2000 Terminal Server + rdesktop is an open source client for Windows NT/2000 Terminal Server, capable + of natively speaking its Remote Desktop Protocol (RDP) in order to present + the user's NT/2000 desktop. Unlike Citrix ICA, no server extensions are + required. + --- rdesktop-1.6.0.orig/debian/rules +++ rdesktop-1.6.0/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: configure + dh_testdir + + CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-ipv6 --with-sound=alsa + + +build: build-stamp + +build-stamp: patch-stamp config.status + dh_testdir + + $(MAKE) + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) distclean + +#ifneq "$(wildcard /usr/share/misc/config.sub)" "" +# cp -f /usr/share/misc/config.sub config.sub +#endif +#ifneq "$(wildcard /usr/share/misc/config.guess)" "" +# cp -f /usr/share/misc/config.guess config.guess +#endif + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install DESTDIR=$(CURDIR)/debian/rdesktop + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs doc/ChangeLog + dh_installexamples + dh_install + dh_installmenu + dh_installman + dh_installdocs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- rdesktop-1.6.0.orig/debian/watch +++ rdesktop-1.6.0/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.rdesktop.org/ .*/rdesktop-([\d\.]+)\.tar\.gz.* --- rdesktop-1.6.0.orig/debian/changelog +++ rdesktop-1.6.0/debian/changelog @@ -0,0 +1,253 @@ +rdesktop (1.6.0-3ubuntu2.1) maverick-security; urgency=low + + * SECURITY UPDATE: arbitrary file disclosure via directory traversal + - debian/patches/81_CVE-2011-1595.dpatch: check path for "/.." in + disk.c. + - CVE-2011-1595 + + -- Marc Deslauriers Tue, 24 May 2011 15:02:43 -0400 + +rdesktop (1.6.0-3ubuntu2) maverick; urgency=low + + * debian/patches/02_raw_keyboard_support.patch: + - Drop patch as it is causing a number of problems in non-raw mode + (LP: #494311) + + -- Robert Ancell Fri, 10 Sep 2010 11:53:46 +1000 + +rdesktop (1.6.0-3ubuntu1) maverick; urgency=low + + * Merge from Debian unstable, remaining Ubuntu changes: + * debian/control: + - Build-depend on libsamplerate-dev + * debian/patches/01_paging.patch: + - Add viewport patch. + + -- Robert Ancell Wed, 16 Jun 2010 15:57:28 +1000 + +rdesktop (1.6.0-3) unstable; urgency=low + + [ Patrick Calhoun ] + * debian/patches/35_force_rdpdr.dpatch: Backported patch From Sameer Naik to + init rdpdr. ( http://article.gmane.org/gmane.network.rdesktop.devel/2808 ) + * debian/patches/32_it_keymap.dpatch: Italian keymap (closes: #540352). + * debian/patches/80_config.dpatch: use autotools config.guess, config.sub + (moved script from debian/rules to the dpatch system) + * Compile with alsa sound support enabled (closes: #507654). + * Added libasound2-dev, dpatch (>= 2.0.9) to build-depends + * Update debhelper-compat to 6 (was 4) , no changes needed. + * Modified debian/rules to build using dpatch + + [ Laszlo Boszormenyi ] + * Added watch file (closes: #519065). + * Moved nostrip option handling to 80_handle_nostrip_option.dpatch as using + dpatch now. + * Added pkg-config to build-depends, needs for detecting ALSA availability. + * Updated Standards-Version to 3.8.2 , no changes needed. + + -- Laszlo Boszormenyi (GCS) Thu, 20 Aug 2009 23:07:08 +0000 + +rdesktop (1.6.0-2) unstable; urgency=low + + * Compile with IPv6 support (closes: #432299). + * Remove obsolete x-dev build-dependency. + * Adhere to policy 10.1 , don't stip binary if nostrip specified in + DEB_BUILD_OPTIONS (closes: #437887). + * Update Standards-Version to 3.8.0 , no changes needed. + + -- Laszlo Boszormenyi (GCS) Sat, 16 Aug 2008 14:40:47 +0000 + +rdesktop (1.6.0-1ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable + * Remaining Ubuntu changes: + - Replace x-dev with libx11-dev in Build-Depends. + - Build with ALSA support. + - Add viewport patch. + * Add patch from Alt Linux that adds support for raw keyboard. + (LP: #251709) + + -- Steve Kowalik Mon, 28 Jul 2008 12:49:31 +1000 + +rdesktop (1.6.0-1) unstable; urgency=low + + * New stable upstream release (closes: #484071). + + -- Laszlo Boszormenyi (GCS) Wed, 04 Jun 2008 09:24:17 +0200 + +rdesktop (1.6.0-0ubuntu2) intrepid; urgency=low + + * Add in dpatch. + * Merge viewport patch from the package in the ubuntu-mobile PPA. + * Munge Maintainer as per spec. + + -- Steve Kowalik Fri, 27 Jun 2008 14:53:29 +1000 + +rdesktop (1.6.0-0ubuntu1) intrepid; urgency=low + + * merge new upstream version. LP: #235160 + * new upstream fixes security issues. LP: #228193 + * replace x-dev with libx11-dev in build-depends. + * build with alsa support. add libasound2-dev and libsamplerate to build + dependencies. LP: #231997 + + -- Reinhard Tartler Tue, 27 May 2008 23:48:23 +0200 + +rdesktop (1.5.0-4+cvs20071006) unstable; urgency=high + + * Fix three security bugs by backporting them to this CVS snapshot, namely + CVE-2008-1801 , CVE-2008-1802 and CVE-2008-1803 + (closes: #480133, #480134, #480135). + + -- Laszlo Boszormenyi (GCS) Thu, 08 May 2008 18:54:16 +0200 + +rdesktop (1.5.0-3+cvs20071006) unstable; urgency=low + + * Fix segfault in XGetPointerMapping() thanks to Felix Domke + (closes: #445779). + + -- Laszlo Boszormenyi (GCS) Sun, 21 Oct 2007 21:34:16 +0200 + +rdesktop (1.5.0-2+cvs20071006) unstable; urgency=low + + * CVS snapshot. + + -- Laszlo Boszormenyi (GCS) Sat, 06 Oct 2007 10:20:59 +0200 + +rdesktop (1.5.0-2) unstable; urgency=low + + * Fix segfault regression caused by libx11-6 security fix. + + -- Laszlo Boszormenyi (GCS) Thu, 12 Apr 2007 21:34:13 +0000 + +rdesktop (1.5.0-1) unstable; urgency=low + + * New upstream release (closes: #393520), accept Victor's change + (closes: #343946). + * New maintainer with ACK from Tomas. + * Tune packaging. + + -- Laszlo Boszormenyi (GCS) Tue, 17 Oct 2006 21:31:16 +0000 + +rdesktop (1.4.1-1.1) unstable; urgency=low + + * Non-maintainer upload. + * xlibs-dev transition. + + -- Victor Seva Sat, 17 Dec 2005 16:17:35 +0100 + +rdesktop (1.4.1-1) unstable; urgency=low + + * New upstream release. + + -- Tomas Fasth Tue, 24 May 2005 13:31:34 +0000 + +rdesktop (1.4.0-2) unstable; urgency=low + + * New maintainer. + * Update Standards-Version to 3.6.1 + + -- Tomas Fasth Fri, 15 Apr 2005 17:47:28 +0000 + +rdesktop (1.4.0-1) unstable; urgency=low + + * NMU: New upstream release with a nod from Sam. + * NMU: Fixed debian/rules to come clean with lintian as follows; + Man page now goes to /usr/share/man instead of /usr/X11R6/man. + Calling dh_installchangelogs before calling dh_installdocs. + + -- Tomas Fasth Wed, 13 Apr 2005 22:59:56 +0000 + +rdesktop (1.3.1-1.1) unstable; urgency=low + + * NMU: apply XEmbed patch, Closes: #268896 + + -- Riku Voipio Sat, 6 Nov 2004 10:09:21 +0000 + +rdesktop (1.3.1-1) unstable; urgency=low + + * New upstream release + * Removes unnecessary manpage. Closes: #223832. + + -- Sam Johnston Wed, 4 Feb 2004 17:52:26 +1100 + +rdesktop (1.3.0-1) unstable; urgency=medium + + * New upstream release + * Adds ChangeLog. Closes: #189667. + * Adds RDP5 support. Closes: #212362. + * Resolves keymap problems. Closes: #198201. + * Adds upstream documentation. Closes: #189666. + + -- Sam Johnston Thu, 30 Oct 2003 13:09:41 +1100 + +rdesktop (1.2.0-2) unstable; urgency=medium + + * resolves lintian warnings: out-of-date-standards-version, + copyright-lists-upstream-authors-with-dh_make-boilerplate, + postinst-should-not-set-usr-doc-link + * built against libssl0.9.7. Closes: #180997. + * updates maintainer email address + * no upstream changelog - 1.2.0 changes listed below. Closes: #186974. + * new more portable key mapping code + * support for high (128-bit) encryption + * toggling out of full-screen mode with Ctrl-Alt-Enter + * a few extra options including host:port syntax + * many, many bug fixes and optimisations + + -- Sam Johnston Tue, 8 Apr 2003 13:56:51 +1000 + +rdesktop (1.2.0-1) unstable; urgency=low + + * New upstream release. Closes: #179546. + + -- Sam Johnston Sun, 23 Feb 2003 17:22:28 +1100 + +rdesktop (1.2beta1-1) unstable; urgency=low + + * New upstream version released (beta) + * License exemption obtained for OpenSSL. Closes: #172574. + + -- Sam Johnston Sun, 8 Dec 2002 15:00:42 +1100 + +rdesktop (1.1.0-2) unstable; urgency=low + + * Moved into main (http://www.debian.org/legal/cryptoinmain) + + -- Sam Johnston Sat, 23 Mar 2002 21:43:05 +1100 + +rdesktop (1.1.0-1) unstable; urgency=low + + * New upstream version released + * Incorporates many fixes from the unified patches: + http://bibl4.oru.se/projects/rdesktop/patch19-changes.txt + * Keyboard support fixes and official manpage to be included in next + release + + -- Sam Johnston Mon, 17 Sep 2001 23:52:08 +1000 + +rdesktop (1.0.0+19.6.6-2.1) unstable; urgency=low + + * NMU (for porting) + * Change rdesktop.h to include and define L_ENDIAN / B_ENDIAN + based on that. Closes: #103409 #103499 + * Change rdesktop.h to define NEEDS_ALIGN on all architecture except i386. + + -- Matthew Wilcox Wed, 11 Jul 2001 20:04:56 -0400 + +rdesktop (1.0.0+19.6.6-2) unstable; urgency=low + + * Rebuild with sane version of dpkg-dev + + -- Sam Johnston Tue, 3 Jul 2001 00:12:06 +1000 + +rdesktop (1.0.0+19.6.6-1) unstable; urgency=low + + * Initial Release. + + -- Sam Johnston Wed, 27 Jun 2001 23:53:17 +1000 + +Local variables: +mode: debian-changelog +End: + --- rdesktop-1.6.0.orig/debian/compat +++ rdesktop-1.6.0/debian/compat @@ -0,0 +1 @@ +6 --- rdesktop-1.6.0.orig/debian/patches/00list +++ rdesktop-1.6.0/debian/patches/00list @@ -0,0 +1,24 @@ +# Nomenclature for the file ordering/naming +# First digit: +# 1 -> Has been applied in some branch upstream. +# It will eventually be applied in a release +# 2 -> Has been or will be fixed differently upstream +# 3 -> Pending upstream. Waiting to land on a branch or some review, +# or some asked modifications +# 6 -> Not yet sent upstream +# 8 -> Debian specific. This we don't want to send upstream or that +# upstream don't want to apply. +# +# Second digit: +# 0 -> Build system +# 1 -> Mostly build +# 2 -> Preferences +# 5 -> General code +# 8 -> Fix for some architectures support +# +01_paging +32_it_keymap.dpatch +35_force_rdpdr.dpatch +80_config.dpatch +80_handle_nostrip_option.dpatch +81_CVE-2011-1595 --- rdesktop-1.6.0.orig/debian/patches/80_handle_nostrip_option.dpatch +++ rdesktop-1.6.0/debian/patches/80_handle_nostrip_option.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 80_handle_nostrip_option.dpatch by Laszlo Boszormenyi . +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Don't strip binary if asked for nostrip via DEB_BUILD_OPTIONS . + +@DPATCH@ +--- rdesktop-1.6.0.orig/Makefile.in ++++ rdesktop-1.6.0/Makefile.in +@@ -18,7 +18,11 @@ + INSTALL = @INSTALL@ + CFLAGS = @CFLAGS@ @X_CFLAGS@ @DEFS@ -DKEYMAP_PATH=\"$(KEYMAP_PATH)\" + LDFLAGS = @LDFLAGS@ @LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ ++ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIP = @STRIP@ ++else ++STRIP=/bin/true ++endif + + TARGETS = rdesktop @RDP2VNCTARGET@ + VNCINC = @VNCINC@ --- rdesktop-1.6.0.orig/debian/patches/01_paging.dpatch +++ rdesktop-1.6.0/debian/patches/01_paging.dpatch @@ -0,0 +1,376 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_paging.dpatch by Adilson Oliveira +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add viewport mode, suitable for small screens. + +@DPATCH@ +diff -Nur -x '*.orig' -x '*~' rdesktop-1.5.0.ume/proto.h rdesktop-1.5.0.ume.new/proto.h +--- rdesktop-1.5.0.ume/proto.h 2008-03-28 17:31:19.000000000 -0300 ++++ rdesktop-1.5.0.ume.new/proto.h 2008-03-28 17:31:24.000000000 -0300 +@@ -235,7 +235,7 @@ + RD_BOOL get_key_state(unsigned int state, uint32 keysym); + RD_BOOL ui_init(void); + void ui_deinit(void); +-RD_BOOL ui_create_window(void); ++RD_BOOL ui_create_window(RD_BOOL ToggleFullscreen); + void ui_resize_window(void); + void ui_destroy_window(void); + void xwin_toggle_fullscreen(void); +diff -Nur -x '*.orig' -x '*~' rdesktop-1.5.0.ume/rdesktop.c rdesktop-1.5.0.ume.new/rdesktop.c +--- rdesktop-1.5.0.ume/rdesktop.c 2008-03-28 17:31:19.000000000 -0300 ++++ rdesktop-1.5.0.ume.new/rdesktop.c 2008-03-28 17:31:42.000000000 -0300 +@@ -103,6 +103,13 @@ + char g_redirect_cookie[128]; + uint32 g_redirect_flags = 0; + ++/* For viewport mode */ ++int xo = 0; ++int yo = 0; ++int perm_xo = 0; // Safe to keep in 0 for now ++int perm_yo = 0; ++RD_BOOL viewport_mode = False; ++ + #ifdef WITH_RDPSND + RD_BOOL g_rdpsnd = False; + #endif +@@ -122,6 +129,7 @@ + rdp2vnc_connect(char *server, uint32 flags, char *domain, char *password, + char *shell, char *directory); + #endif ++ + /* Display usage information */ + static void + usage(char *program) +@@ -563,6 +571,8 @@ + g_pos |= (*p == '-') ? 4 : 1; + g_ypos = strtol(p, NULL, 10); + } ++ perm_xo = xo; ++ perm_yo = yo; + + break; + +@@ -947,7 +957,7 @@ + memset(password, 0, sizeof(password)); + + if (run_count == 0) +- if (!ui_create_window()) ++ if (!ui_create_window(False)) + continue_connect = False; + + if (continue_connect) +diff -Nur -x '*.orig' -x '*~' rdesktop-1.5.0.ume/xwin.c rdesktop-1.5.0.ume.new/xwin.c +--- rdesktop-1.5.0.ume/xwin.c 2008-03-28 17:31:19.000000000 -0300 ++++ rdesktop-1.5.0.ume.new/xwin.c 2008-03-28 17:31:24.000000000 -0300 +@@ -50,7 +50,11 @@ + static int g_x_socket; + static Screen *g_screen; + Window g_wnd; +- ++extern BOOL viewport_mode; ++BOOL viewport_keys_enabled = False; ++BOOL viewport_mode_locked = False; ++Window g_viewport_wnd = 0; ++uint32 g_embed_wnd; + /* SeamlessRDP support */ + typedef struct _seamless_group + { +@@ -134,6 +138,27 @@ + ('host' is the machine running rdesktop; the host simply memcpy's + so its endianess doesn't matter) + */ ++static Cursor viewportCursor; ++static int viewportLastX; ++static int viewportLastY; ++int g_viewport_width; ++int g_viewport_height; ++int g_saved_viewport_width = 0; ++int g_saved_viewport_height= 0; ++int g_saved_viewport_x= 0; ++int g_saved_viewport_y= 0; ++int g_saved_wnd_x = 0; ++int g_saved_wnd_y = 0; ++int g_wnd_x; ++int g_wnd_y; ++int viewport_x1; ++int viewport_y1; ++int xo; ++int yo; ++extern int perm_xo; ++extern int perm_yo; ++ ++void MoveViewport(int hShift, int vShift); + static RD_BOOL g_no_translate_image = False; + + /* endianness */ +@@ -524,7 +549,7 @@ + return; + } + +- XChangeProperty(g_display, wnd, hintsatom, hintsatom, 32, PropModeReplace, ++ XChangeProperty(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, hintsatom, hintsatom, 32, PropModeReplace, + (unsigned char *) &motif_hints, PROP_MOTIF_WM_HINTS_ELEMENTS); + + } +@@ -1722,7 +1747,7 @@ + } + + RD_BOOL +-ui_create_window(void) ++ui_create_window(RD_BOOL ToggleFullscreen) + { + uint8 null_pointer_mask[1] = { 0x80 }; + uint8 null_pointer_data[24] = { 0x00 }; +@@ -1733,6 +1758,7 @@ + int wndwidth, wndheight; + long input_mask, ic_input_mask; + XEvent xevent; ++ int x1, y1; + + wndwidth = g_fullscreen ? WidthOfScreen(g_screen) : g_width; + wndheight = g_fullscreen ? HeightOfScreen(g_screen) : g_height; +@@ -1767,7 +1793,75 @@ + XSetForeground(g_display, g_gc, BlackPixelOfScreen(g_screen)); + XFillRectangle(g_display, g_backstore, g_gc, 0, 0, g_width, g_height); + } +- ++ if ((((g_width >= WidthOfScreen(g_screen)*1.05)) || ++ (g_height >= (HeightOfScreen(g_screen)*1.1))) && (ToggleFullscreen)) ++ { ++ viewport_mode_locked = True; ++ viewport_keys_enabled = True; ++ } ++ ++ if ((!g_embed_wnd) && (viewport_mode)) ++ { ++ if (g_fullscreen) ++ { ++ x1 = (WidthOfScreen(g_screen) - g_width)/2; ++ y1 = (HeightOfScreen(g_screen) - g_height)/2; ++ g_viewport_width = (WidthOfScreen(g_screen)); ++ g_viewport_height= (HeightOfScreen(g_screen)); ++ } ++ else ++ { ++ if (!ToggleFullscreen) ++ { ++ xo = g_saved_viewport_x; ++ yo = g_saved_viewport_y; ++ } ++ if (g_saved_wnd_x == 0 && g_saved_wnd_y == 0) ++ { ++ x1 = y1 = 0; ++ } ++ else ++ { ++ x1 = g_saved_wnd_x; ++ y1 = g_saved_wnd_y; ++ } ++ ++ if (g_saved_viewport_width && g_saved_viewport_height) ++ { ++ g_viewport_width = g_saved_viewport_width; ++ g_viewport_height = g_saved_viewport_height; ++ } ++ else ++ { ++ g_viewport_width = wndwidth < (WidthOfScreen(g_screen)*1.05) ? wndwidth : WidthOfScreen(g_screen)*3/4; ++ g_viewport_height= wndheight< (HeightOfScreen(g_screen)*1.1) ? wndheight: HeightOfScreen(g_screen)*3/4; ++ g_viewport_width = g_viewport_width & ~3; ++ } ++ } ++ ++ attribs.override_redirect = g_fullscreen; ++ ++ if (viewport_mode) ++ { ++ if ((xo == 0) && (yo == 0)) ++ { ++ xo = (WidthOfScreen(g_screen) - g_viewport_width)/2; ++ yo = (HeightOfScreen(g_screen) - g_viewport_height)/2; ++ } ++ g_viewport_wnd = XCreateWindow (g_display, RootWindowOfScreen(g_screen), xo, yo, g_viewport_width, g_viewport_height, ++ 0, g_depth, InputOutput, g_visual, CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap | CWBorderPixel, &attribs); ++ ++ XSelectInput(g_display, g_viewport_wnd, ButtonPressMask | KeyPressMask | ++ StructureNotifyMask | (g_fullscreen ? EnterWindowMask : 0) | ++ (g_grab_keyboard ? (EnterWindowMask | LeaveWindowMask) : 0)); ++ ++ XReparentWindow (g_display, g_wnd, g_viewport_wnd, (ToggleFullscreen && g_fullscreen) ? perm_xo : 0, (ToggleFullscreen && g_fullscreen) ? perm_yo : 0); ++ } ++ } ++ ++ /* Check XStoreName consistency */ ++ ++ XStoreName(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, g_title); + XStoreName(g_display, g_wnd, g_title); + ewmh_set_wm_name(g_wnd, g_title); + +@@ -1778,7 +1872,7 @@ + if (classhints != NULL) + { + classhints->res_name = classhints->res_class = "rdesktop"; +- XSetClassHint(g_display, g_wnd, classhints); ++ XSetClassHint(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, classhints); + XFree(classhints); + } + +@@ -1790,7 +1884,7 @@ + sizehints->flags |= PPosition; + sizehints->min_width = sizehints->max_width = g_width; + sizehints->min_height = sizehints->max_height = g_height; +- XSetWMNormalHints(g_display, g_wnd, sizehints); ++ XSetWMNormalHints(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, sizehints); + XFree(sizehints); + } + +@@ -1812,9 +1906,15 @@ + } + + XSelectInput(g_display, g_wnd, input_mask); +- XMapWindow(g_display, g_wnd); ++ if (viewport_mode) ++ { ++ XMapWindow (g_display, g_viewport_wnd); ++ } ++ ++ XMapWindow(g_display, g_wnd); ++ ++ /* wait for VisibilityNotify */ + +- /* wait for VisibilityNotify */ + do + { + XMaskEvent(g_display, VisibilityChangeMask, &xevent); +@@ -1876,7 +1976,14 @@ + if (g_IC != NULL) + XDestroyIC(g_IC); + +- XDestroyWindow(g_display, g_wnd); ++ if (g_viewport_wnd) ++ { ++ XDestroyWindow (g_display, g_viewport_wnd); ++ } ++ else ++ { ++ XDestroyWindow(g_display, g_wnd); ++ } + } + + void +@@ -1897,7 +2004,7 @@ + + ui_destroy_window(); + g_fullscreen = !g_fullscreen; +- ui_create_window(); ++ ui_create_window(True); + + XDefineCursor(g_display, g_wnd, g_current_cursor); + +@@ -2101,6 +2208,21 @@ + xevent.xmotion.y_root - g_move_y_offset); + break; + } ++ ++ if (viewportCursor) ++ { ++ /* ++ * Pointer is in viewport navigation mode. ++ */ ++ ++ MoveViewport(viewportLastX - xevent.xmotion.x_root, ++ viewportLastY - xevent.xmotion.y_root); ++ ++ viewportLastX = xevent.xmotion.x_root; ++ viewportLastY = xevent.xmotion.y_root; ++ ++ break; ++ } + + if (g_fullscreen && !g_focused) + XSetInputFocus(g_display, g_wnd, RevertToPointerRoot, +@@ -3286,6 +3408,83 @@ + + XFree(image); + } ++void MoveViewport(int hShift, int vShift) ++{ ++ int newX; ++ int newY; ++ Bool do_move = False; ++ int viewportXSpan = g_viewport_width - g_width; ++ int viewportYSpan = g_viewport_height - g_height; ++ ++ if (!g_viewport_wnd) ++ { ++ return; ++ } ++ ++ /* ++ * We must keep x coordinate between viewportXSpan and zero, if viewportXSpan ++ * is less then zero. If viewportXSpan is greater or equal to zero, it means ++ * the agent root window has a size smaller than the agent default window. ++ * In this case we keep the old coordinate. ++ */ ++ ++ if (viewportXSpan < 0) ++ { ++ newX = g_wnd_x - hShift; ++ ++ if (newX > 0) ++ { ++ newX = 0; ++ } ++ else if (newX < viewportXSpan) ++ { ++ newX = viewportXSpan; ++ } ++ } ++ else if (viewportXSpan == 0) ++ { ++ newX = 0; ++ } ++ else ++ { ++ newX = g_wnd_x; ++ } ++ ++ if (viewportYSpan < 0) ++ { ++ newY = g_wnd_y - vShift; ++ if (newY > 0) ++ { ++ newY = 0; ++ } ++ else if (newY < viewportYSpan) ++ { ++ newY = viewportYSpan; ++ } ++ } ++ else if (viewportYSpan == 0) ++ { ++ newY = 0; ++ } ++ else ++ { ++ newY = g_wnd_y; ++ } ++ if (newX != g_wnd_x) ++ { ++ g_wnd_x = newX; ++ do_move = True; ++ } ++ if (newY != g_wnd_y) ++ { ++ g_wnd_y = newY; ++ do_move = True; ++ } ++ ++ if (do_move) ++ XMoveWindow(g_display, g_wnd, g_wnd_x, g_wnd_y); ++} ++ + + /* these do nothing here but are used in uiports */ + void --- rdesktop-1.6.0.orig/debian/patches/80_config.dpatch +++ rdesktop-1.6.0/debian/patches/80_config.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh -e +## 80_config.dpatch by Mike Hommey +## Dumbed down for rdesktop by Patrick Calhoun +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Use config.guess and config.sub from autotools-dev + +dpatch_patch () +{ + for file in config.guess config.sub; do + sed -i '2!b;/^#/ i\exec "/usr/share/misc/'$file'" "$@"' $file + done +} + +dpatch_unpatch () +{ + for file in config.guess config.sub; do + sed -i '2!b;/^exec "/ d' $file + done +} + +DPATCH_LIB_NO_DEFAULT=1 + +. /usr/share/dpatch/dpatch.lib.sh --- rdesktop-1.6.0.orig/debian/patches/32_it_keymap.dpatch +++ rdesktop-1.6.0/debian/patches/32_it_keymap.dpatch @@ -0,0 +1,25 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## it_keymap.dpatch by Patrick Calhoun +## (original patch by Luca Tettamanti +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Italian Keyboard map that includes brace characters. + +@DPATCH@ +diff -urNad rdesktop-1.6.0~/keymaps/it rdesktop-1.6.0/keymaps/it +--- rdesktop-1.6.0~/keymaps/it 2003-11-03 08:54:52.000000000 -0600 ++++ rdesktop-1.6.0/keymaps/it 2009-08-19 15:29:22.000000000 -0500 +@@ -58,11 +58,11 @@ + egrave 0x1a + eacute 0x1a shift + bracketleft 0x1a altgr +-dead_abovering 0x1a shift altgr ++braceleft 0x1a shift altgr + plus 0x1b + asterisk 0x1b shift + bracketright 0x1b altgr +-dead_macron 0x1b shift altgr ++braceright 0x1b shift altgr + ae 0x1e altgr + AE 0x1e shift altgr + ssharp 0x1f altgr --- rdesktop-1.6.0.orig/debian/patches/81_CVE-2011-1595.dpatch +++ rdesktop-1.6.0/debian/patches/81_CVE-2011-1595.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +# Description: fix arbitrary file disclosure via directory traversal +# Origin: upstream, http://rdesktop.svn.sourceforge.net/viewvc/rdesktop?view=revision&revision=1626 +# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623552 +# Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=676252 + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' rdesktop-1.6.0~/disk.c rdesktop-1.6.0/disk.c +--- rdesktop-1.6.0~/disk.c 2008-02-15 19:13:25.000000000 -0500 ++++ rdesktop-1.6.0/disk.c 2011-05-24 15:02:38.525282697 -0400 +@@ -356,6 +356,19 @@ + filename[strlen(filename) - 1] = 0; + sprintf(path, "%s%s", g_rdpdr_device[device_id].local_path, filename); + ++ /* Protect against mailicous servers: ++ somelongpath/.. not allowed ++ somelongpath/../b not allowed ++ somelongpath/..b in principle ok, but currently not allowed ++ somelongpath/b.. ok ++ somelongpath/b..b ok ++ somelongpath/b../c ok ++ */ ++ if (strstr(path, "/..")) ++ { ++ return RD_STATUS_ACCESS_DENIED; ++ } ++ + switch (create_disposition) + { + case CREATE_ALWAYS: --- rdesktop-1.6.0.orig/debian/patches/35_force_rdpdr.dpatch +++ rdesktop-1.6.0/debian/patches/35_force_rdpdr.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## force_rdpdr.dpatch by Patrick Calhoun +## (Original patch by Sameer Naik) +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Initializes the rdpdr channel whether or not any devices are being +## DP: redirected. As a result of this patch audio playback works when connected +## DP: to a vista (_w SP1) machine using rdesktop client. + +@DPATCH@ +diff -urNad rdesktop-1.6.0~/rdpdr.c rdesktop-1.6.0/rdpdr.c +--- rdesktop-1.6.0~/rdpdr.c 2008-02-14 05:37:17.000000000 -0600 ++++ rdesktop-1.6.0/rdpdr.c 2009-08-19 14:50:35.000000000 -0500 +@@ -841,13 +841,10 @@ + RD_BOOL + rdpdr_init() + { +- if (g_num_devices > 0) +- { +- rdpdr_channel = +- channel_register("rdpdr", +- CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_COMPRESS_RDP, +- rdpdr_process); +- } ++ rdpdr_channel = ++ channel_register("rdpdr", ++ CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_COMPRESS_RDP, ++ rdpdr_process); + + return (rdpdr_channel != NULL); + }