--- vnc4-4.1.1+xorg1.0.2.orig/debian/xvnc4viewer.menu +++ vnc4-4.1.1+xorg1.0.2/debian/xvnc4viewer.menu @@ -0,0 +1,5 @@ +?package(xvnc4viewer):needs="X11" \ + section="Apps/Net" \ + title="VNC Viewer" \ + command="xvnc4viewer" \ + hints="VNC viewer" --- vnc4-4.1.1+xorg1.0.2.orig/debian/xvnc4viewer.prerm +++ vnc4-4.1.1+xorg1.0.2/debian/xvnc4viewer.prerm @@ -0,0 +1,11 @@ +#!/bin/sh -e + +if [ "$1" = "remove" ] ; then + BIN=/usr/bin + update-alternatives --remove \ + vncviewer $BIN/xvnc4viewer +fi + +#DEBHELPER# + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4-common.prerm +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4-common.prerm @@ -0,0 +1,11 @@ +#!/bin/sh -e + +if [ "$1" = "remove" ] ; then + BIN=/usr/bin + update-alternatives --remove \ + vncpasswd $BIN/vnc4passwd +fi + +#DEBHELPER# + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc.conf +++ vnc4-4.1.1+xorg1.0.2/debian/vnc.conf @@ -0,0 +1,103 @@ +# /etc/vnc.conf written by Marcus Brinkmann. This file is in the Public Domain. +# +# This is the configuration file for the vncserver package. +# It is perl syntax, but only variable assignment is allowed. +# A semicolon will be added if missing. +# Every value has suitable defaults, so you probably don't need any file. +# +# This file will be sourced by `vncserver' and `vncpasswd'. +# After this file, $(HOME)/.vncrc will be sourced, so values can be +# overwritten on a per-user basis. If you want to reactivate the default +# value there, you have to specify an empty value. For example, $fontPath +# will set to the default value after +# +# $fontPath = "/foo"; +# $fontPath = ""; +# +# If you are missing something, please let me know. +# Marcus.Brinkmann@ruhr-uni-bochum.de + +# System configuration +# -------------------- +# +# This section contains entries that should be true for all users. + +# $vncClasses should be the path to the java classes of server. +# $vncClasses = "/usr/share/vncserver"; + +# $XFConfigPath can be set to the global XF86Config file. This will be +# parsed to gain default values for $fontPath and $colorPath. +# If you want to disable this feature, point it to an +# invalid file, "/foo" for example. +# $XFConfigPath = "/etc/X11/XF86Config-4"; + +# $fontPath should be a comma seperated list of fonts to be added to the font +# path. If not specified, and $XFConfigPath is valid, vncserver +# will read the $fontPath from there. If both are not set, the +# default will apply. +# Example: $fontPath = "tcp/localhost:7100"; # would make vnc to use xfs. +# Example: $fontPath = ""; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/misc/,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/Type1/,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/Speedo/,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/freefont/,"; +# $fontPath .= "/usr/X11R6/lib/X11/fonts/sharefont/"; +# I don't know what the default is, though. + +# $colorPath should be the RGB file to be used by X. This can also be taken from +# XF86Config file if specified by $XFConfigPath +# $colorPath = "/usr/X11R6/lib/X11/rgb"; + +# User configuration +# ------------------ +# +# This section contains entries that may change from user to user. + +# $vncUserDir contains the filename for the log files directory of Xvnc +# (the server) and the viewers that are connected to it. +# $vncUserDir = "$ENV{HOME}/.vnc"; + +# $vncPasswdFile contains the filename of the password file for Xvnc. +# $vncPasswdFile = $vncUserDir . "/passwd"; + +# $vncStartup points to a script that will be started at the very beginning. +# $vncStartup = "/etc/X11/Xsession"; + +# $xauthorityFile should be the path to the authority file that should be used +# by your vnc X server. +# $xauthorityFile = "$ENV{HOME}/.Xauthority"; + +# $defaultDesktopName should be set to the default name of the desktop. +# This can be changed at the command line with -name. +# $defaultDesktopName = "X"; + +# $geometry sets framebuffer width & height. Default will be calculated if +# server is started from within a running X servers. Can be changed at +# the commandline (-geometry). A fixed default will be used if +# vncserver is not invoked in a running X session. +# Example: $geometry ="640x480"; + +# $depth sets the framebuffer color depth. Must be between 8 and 32. +# $pixelformat sets the default pixelformat. +# The default will be calculated if none of both is specified +# and when vncserver is called from within a running X servers. +# Can be changed at the command line with option -depth. +# A fixed default value will be used if vncserver is not +# invoked in a running X session. +# Example: $depth = "16"; +# $pixelformat = "rgb565"; + +# $getDefaultFrom sets the display from which you can query the default of +# the above three options, if you don't want to start vncserver +# from within a running X server. It will be added to the call +# of xdpyinfo. +# It is useful to get the default from the X server you will +# run xvncviewer in. +# Example: $getDefaultFrom = "-display localhost:0" + +# $rfbwait sets the maximum time in msec to wait for vnc client viewer. +# $rfbwait = "120000"; --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4server.prerm +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4server.prerm @@ -0,0 +1,17 @@ +#!/bin/sh -e + +if [ "$1" = "remove" ] ; then + BIN=/usr/bin + update-alternatives --remove \ + vncserver $BIN/vnc4server + update-alternatives --remove \ + Xvnc $BIN/Xvnc4 + update-alternatives --remove \ + x0vncserver $BIN/x0vnc4server + update-alternatives --remove \ + vnc4config $BIN/vnc4config +fi + +#DEBHELPER# + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/xvnc4viewer.postinst +++ vnc4-4.1.1+xorg1.0.2/debian/xvnc4viewer.postinst @@ -0,0 +1,18 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + MAN=/usr/share/man/man1 + BIN=/usr/bin + update-alternatives --install \ + $BIN/vncviewer vncviewer $BIN/xvnc4viewer 75 \ + --slave \ + $MAN/vncviewer.1.gz vncviewer.1.gz $MAN/xvnc4viewer.1.gz \ + --slave \ + $MAN/xvncviewer.1.gz xvncviewer.1.gz $MAN/xvnc4viewer.1.gz \ + --slave \ + $BIN/xvncviewer xvncviewer $BIN/xvnc4viewer +fi + +#DEBHELPER# + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/buildX.sh +++ vnc4-4.1.1+xorg1.0.2/debian/buildX.sh @@ -0,0 +1,44 @@ +#!/bin/sh -e +echo "***************** START Xvnc BUILD ************************************" +if [ ! -d buildtemp ] ; then + mkdir buildtemp + cd buildtemp + echo "*** Copy VNC xc source dir" + cp -a ../unix/xc . + cp -a ../unix/vncconfig . + cp -a ../common/rfb . + cp -a ../common/rdr . + cp -a ../common/network . + cp -a ../common/Xregion . + cp -a ../unix/depend.mk . + cp -a ../unix/Makefile . + cp -a ../unix/tx . + cp -a ../unix/vncmkdepend . + echo "*** Unpacking X source" + dpkg-source -x ../xsrc/xorg-server*dsc + rm -f xorg-server_*orig.tar.gz + mv xorg-server-*/* . + rmdir xorg-server-* +# echo "*** Patching X source" +# patch -Np0 < ../xc.patch +# patch -p1 < ../xsrc/xccompilefix.patch +# patch -p1 < ../xsrc/vncsofpicfix.patch +else + cd buildtemp +fi +cd xc +echo "*** Build X source" +make World +#echo "" > config/cf/version.def +#make Makefile.boot +#make Makefiles +#make includes +#make depend +#cd config/util +#make +#cd ../../programs/Xserver/vnc +#make +## Now vnc.o is created +#cd .. +#make Xvnc +## Now Xvnc should be created --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/manpage.sgml.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/manpage.sgml.ex @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + FIRSTNAME"> + SURNAME"> + + augusti 8, 2004"> + + SECTION"> + opal@debian.org"> + + VNC4"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + + + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/init.d.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/init.d.ex @@ -0,0 +1,74 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/vnc4 +NAME=vnc4 +DESC=vnc4 + +test -x $DAEMON || exit 0 + +# Include vnc4 defaults if available +if [ -f /etc/default/vnc4 ] ; then + . /etc/default/vnc4 +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/manpage.1.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/manpage.1.ex @@ -0,0 +1,60 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH VNC4 SECTION "augusti 8, 2004" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +vnc4 \- program to do something +.SH SYNOPSIS +.B vnc4 +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B vnc4 +and +.B bar +commands. +This manual page was written for the Debian distribution +because the original program does not have a manual page. +Instead, it has documentation in the GNU Info format; see below. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBvnc4\fP is a program that... +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH SEE ALSO +.BR bar (1), +.BR baz (1). +.br +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +This manual page was written by Ola Lundqvist , +for the Debian project (but may be used by others). --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/cron.d.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the vnc4 package +# +0 4 * * * root vnc4_maintenance --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/vnc4-doc.docs +++ vnc4-4.1.1+xorg1.0.2/debian/ex/vnc4-doc.docs @@ -0,0 +1,2 @@ +#DOCS# + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/prerm.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/prerm.ex @@ -0,0 +1,39 @@ +#! /bin/sh +# prerm script for vnc4 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) +# install-info --quiet --remove /usr/info/vnc4.info.gz + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/emacsen-install.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/emacsen-install.ex @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/vnc4 + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=vnc4 + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/conffiles.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/conffiles.ex @@ -0,0 +1,7 @@ +# +# If you want to use this conffile, remove all comments and put files that +# you want dpkg to process here using their absolute pathnames. +# See the policy manual +# +# for example: +# /etc/vnc4/vnc4.conf --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/postrm.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/postrm.ex @@ -0,0 +1,38 @@ +#! /bin/sh +# postrm script for vnc4 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/vnc4.doc-base.EX +++ vnc4-4.1.1+xorg1.0.2/debian/ex/vnc4.doc-base.EX @@ -0,0 +1,22 @@ +Document: vnc4 +Title: Debian vnc4 Manual +Author: +Abstract: This manual describes what vnc4 is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/vnc4/vnc4.sgml.gz + +Format: postscript +Files: /usr/share/doc/vnc4/vnc4.ps.gz + +Format: text +Files: /usr/share/doc/vnc4/vnc4.text.gz + +Format: HTML +Index: /usr/share/doc/vnc4/html/index.html +Files: /usr/share/doc/vnc4/html/*.html + + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/vnc4-default.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/vnc4-default.ex @@ -0,0 +1,10 @@ +# Defaults for vnc4 initscript +# sourced by /etc/init.d/vnc4 +# installed at /etc/default/vnc4 by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/emacsen-remove.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/emacsen-remove.ex @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/vnc4 + +FLAVOR=$1 +PACKAGE=vnc4 + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/vnc4.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/postinst.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/postinst.ex @@ -0,0 +1,42 @@ +#! /bin/sh +# postinst script for vnc4 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/vnc4-doc/usr/share/doc/vnc4-doc/changelog.Debian +++ vnc4-4.1.1+xorg1.0.2/debian/ex/vnc4-doc/usr/share/doc/vnc4-doc/changelog.Debian @@ -0,0 +1,6 @@ +vnc4 (4.0-1) unstable; urgency=low + + * Initial Release. + + -- Ola Lundqvist Sun, 8 Aug 2004 14:54:54 +0200 + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/preinst.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/preinst.ex @@ -0,0 +1,44 @@ +#! /bin/sh +# preinst script for vnc4 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) +# if [ "$1" = "upgrade" ] +# then +# start-stop-daemon --stop --quiet --oknodo \ +# --pidfile /var/run/vnc4.pid \ +# --exec /usr/sbin/vnc4 2>/dev/null || true +# fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/emacsen-startup.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/emacsen-startup.ex @@ -0,0 +1,19 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file for the Debian vnc4 package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The vnc4 package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. +;; We have to add this to the load-path: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/vnc4"))) + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)))) + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/manpage.xml.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/manpage.xml.ex @@ -0,0 +1,148 @@ + +.
will be generated. You may view the +manual page with: nroff -man .
| less'. A +typical entry in a Makefile or Makefile.am is: + +DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ +manpages/docbook.xsl +XP=xsltproc -''-nonet + +manpage.1: manpage.dbk + $(XP) $(DB2MAN) $< + +The xsltproc binary is found in the xsltproc package. The +XSL files are in docbook-xsl. Please remember that if you +create the nroff version in one of the debian/rules file +targets (such as build), you will need to include xsltproc +and docbook-xsl in your Build-Depends control field. + +--> + + + FIRSTNAME"> + SURNAME"> + + augusti 8, 2004"> + + SECTION"> + opal@debian.org"> + + VNC4"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and bar + commands. + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation in the &gnu; + Info format; see below. + + &dhpackage; is a program that... + + + + OPTIONS + + These programs follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. For a complete description, see the + Info files. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/watch.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/watch.ex @@ -0,0 +1,6 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +version=2 +sunsite.unc.edu /pub/Linux/Incoming vnc4-(.*)\.tar\.gz debian uupdate --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/vnc4-doc.files +++ vnc4-4.1.1+xorg1.0.2/debian/ex/vnc4-doc.files @@ -0,0 +1,2 @@ +#DOCS# + --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/README.Debian +++ vnc4-4.1.1+xorg1.0.2/debian/ex/README.Debian @@ -0,0 +1,6 @@ +vnc4 for Debian +--------------- + + + + -- Ola Lundqvist , Sun, 8 Aug 2004 14:54:54 +0200 --- vnc4-4.1.1+xorg1.0.2.orig/debian/ex/menu.ex +++ vnc4-4.1.1+xorg1.0.2/debian/ex/menu.ex @@ -0,0 +1,2 @@ +?package(vnc4):needs=X11|text|vc|wm section=Apps/see-menu-manual\ + title="vnc4" command="/usr/bin/vnc4" --- vnc4-4.1.1+xorg1.0.2.orig/debian/rules +++ vnc4-4.1.1+xorg1.0.2/debian/rules @@ -0,0 +1,215 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# 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 +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +unix/config.status: unix/configure + dh_testdir + # Add here commands to configure the package. + cd unix && autoconf + cd unix && \ + CFLAGS="$(CFLAGS)" ./configure \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + \ + --with-installed-zlib + + +#Architecture +build: build-arch build-indep + +build-arch: build-arch-stamp build-java-stamp build-server-stamp +build-arch-stamp: unix/config.status + $(MAKE) -C unix + touch build-arch-stamp + +build-java-stamp: build-arch-stamp + touch build-java-stamp + +build-server-stamp: build-arch-stamp + rm -rf xorg-xserver* + dpkg-source -x ./xsrc/xorg-server_*dsc + cd xorg-server-1.0.2 && debian/rules patch + cd xorg-server-1.0.2 && patch -p1 < ../debian/patches/xorg-vnc-debian.patch + ln -sf xorg-server-1.0.2 xorg-server + cd unix && ln -s ../xorg-server-1.0.2 xorg-server-1.0.2 + cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \ + unix/xc/programs/Xserver/Xvnc.man \ + unix/xc/programs/Xserver/vnc/*.h \ + unix/xc/programs/Xserver/vnc/*.cc \ + xorg-server-*/hw/vnc/ + cp -a xorg-server-*/cfb/cfb.h xorg-server-*/hw/vnc + cp -a xorg-server-*/fb/fb.h xorg-server-*/hw/vnc + cp -a xorg-server-*/fb/fbrop.h xorg-server-*/hw/vnc + sed -i -e 's,xor,c_xor,' -e 's,and,c_and,' \ + xorg-server-*/hw/vnc/cfb.h \ + xorg-server-*/hw/vnc/fb.h \ + xorg-server-*/hw/vnc/fbrop.h + cd xorg-server && automake-1.9 + cd xorg-server && autoconf + cd xorg-server && ./configure \ + --enable-xorg \ + --disable-dependency-tracking \ + --disable-xprint \ + --disable-static \ + --enable-composite \ + --with-rgb-path=/etc/X11/rgb \ + --with-xkb-output=/var/lib/xkb \ + --with-fontdir=/usr/share/X11/fonts \ + --disable-xorgcfg \ + --disable-xorgconfig \ + --disable-dmx \ + --disable-lbx \ + --enable-xdmcp \ + --disable-xevie \ + --disable-dri \ + --with-int10=stub \ + --prefix=/usr --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info --sysconfdir=/etc \ + --localstatedir=/var $(confflags) + +# --with-os-name="$$(lsb_release -ds)" \ +# --with-os-vendor="$$(lsb_release -is)" \ + + $(MAKE) -C xorg-server + + touch build-server-stamp + + +build-indep: build-indep-stamp +build-indep-stamp: unix/config.status + + # Add here commands to compile the indep part of the package. + #$(MAKE) doc + touch build-indep-stamp + +clean: + dh_testdir + dh_testroot + -rm -Rf $(CURDIR)/debian/tmp + rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP# + + # Add here commands to clean up after the build process. + -rm -f config.log config.status config.cache config.guess config.sub + -rm -Rf buildtemp + -$(MAKE) -C common distclean + -$(MAKE) -C common clean + -$(MAKE) -C unix distclean + -$(MAKE) -C unix clean +#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 + + rm -f xorg-server unix/xorg-server-1.* xorg-server_* + rm -rf xorg-server-1.* + + dh_clean + +install: install-indep install-arch +install-indep: +## dh_testdir +## dh_testroot +## dh_clean -k -i +## dh_installdirs -i +## +## # Add here commands to install the indep part of the package into +## # debian/-doc. +## #INSTALLDOC# +## +## dh_install -i + +install-arch: + dh_testdir + dh_testroot + dh_clean -k -s + dh_installdirs -s + + # Add here commands to install the arch part of the package into + # debian/tmp. + #$(MAKE) install prefix=$(CURDIR)/debian/vnc4/usr + mkdir -p $(CURDIR)/debian/tmp/usr/bin + mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1 + mkdir -p $(CURDIR)/debian/tmp/usr/lib/xorg/modules/extensions + cd unix && ./vncinstall \ + $(CURDIR)/debian/tmp/usr/bin \ + $(CURDIR)/debian/tmp/usr/share/man \ + $(CURDIR)/debian/tmp/usr/lib/xorg/modules/extensions + rename "s/vncviewer/xvncviewer/;" \ + debian/tmp/usr/bin/* \ + debian/tmp/usr/share/man/man1/* + rename "s/vnc/vnc4/;" \ + debian/tmp/usr/bin/* \ + debian/tmp/usr/share/man/man1/* + dh_install -s + +# Must not depend on anything. This is to be called by +# binary-arch/binary-indep +# in another 'make' thread. +binary-common: + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_fixperms + dh_strip + dh_compress +# dh_perl +# dh_python + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb +# Build architecture independant packages using the common target. +binary-indep: build-indep install-indep +## $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build-arch install-arch + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch --- vnc4-4.1.1+xorg1.0.2.orig/debian/control +++ vnc4-4.1.1+xorg1.0.2/debian/control @@ -0,0 +1,60 @@ +Source: vnc4 +Section: x11 +Priority: optional +Maintainer: Ola Lundqvist +Build-Depends: debhelper (>= 4.0.0), perl, zlib1g-dev, automake1.9, autoconf, xserver-xorg-dev, xutils, pkg-config, x11proto-bigreqs-dev, x11proto-composite-dev, x11proto-core-dev, x11proto-damage-dev, x11proto-evie-dev, x11proto-fixes-dev, x11proto-kb-dev (>= 1.0.1-1), x11proto-xinerama-dev, x11proto-randr-dev, x11proto-record-dev, x11proto-render-dev, x11proto-resource-dev, x11proto-scrnsaver-dev, x11proto-trap-dev, x11proto-video-dev, x11proto-xcmisc-dev, x11proto-xext-dev (>= 6.9.99.0-1), x11proto-xf86bigfont-dev, x11proto-xf86dga-dev, x11proto-xf86misc-dev, x11proto-xf86vidmode-dev, xtrans-dev, libxau-dev (>= 1:0.1.2-1), libxdmcp-dev (>= 1:0.1.3-2), libxfont-dev, libfontenc-dev, libxkbfile-dev (>= 7.0.0-1), x11proto-xf86dri-dev, libdrm-dev (>> 2.0), mesa-swx11-source (>> 6.4.1), x11proto-gl-dev (>= 1.4.1-1), libgl1-mesa-dev, libxmuu-dev (>= 1:6.2.3-1), libxext-dev (>= 1:6.4.3-1), libx11-dev (>= 1:6.2.1+cvs.20050722-1), libxrender-dev (>= 1:0.9.0-1), libxi-dev (>= 1:1.3.0-2), x11proto-dmx-dev, dpatch, libdmx-dev, libxpm-dev (>= 1:3.5.3-1), libxaw7-dev (>= 2:0.99.1-1), libxt-dev (>> 1:0.99.3+cvs.20051212), libxmu-dev (>= 2:0.99.1-1), libxtst-dev (>= 2:0.99.1-1), libxres-dev (>= 1:1.0.2+0.99.1-1), libfreetype6-dev, flex +Standards-Version: 3.6.1 + +Package: vnc4server +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, vnc4-common | vnc-common, xbase-clients, x11-common +Provides: vnc-server, x0vnc-server +Recommends: xfonts-base +Suggests: vnc-java +Description: Virtual network computing server software + VNC stands for Virtual Network Computing. It is, in essence, a remote + display system which allows you to view a computing `desktop' environment + not only on the machine where it is running, but from anywhere on the + Internet and from a wide variety of machine architectures. + . + This package provides a vncserver to which X clients can connect and the + server generates a display that can be viewed with a vncviewer. + . + It contains an X server connector so clients can connect to your local X + desktop directly. + . + Note: This server does not need a display. You need a vncviewer to see + something. This viewer may also be on a computer running other operating + systems. + +Package: xvnc4viewer +Section: net +Architecture: any +Provides: vnc-viewer +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: vnc4-common | vnc-common +Description: Virtual network computing client software for X + VNC stands for Virtual Network Computing. It is, in essence, a remote + display system which allows you to view a computing `desktop' environment + not only on the machine where it is running, but from anywhere on the + Internet and from a wide variety of machine architectures. + . + It is implemented in a client/server model. This package provides a vncclient + for X, with this you can connect to a vncserver somewhere in the network + and display its content in a window. There are vncserver available for X + and for Win95/NT. + +Package: vnc4-common +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: xvnc4viewer|vncviewer, vnc4server +Provides: vnc-common +Conflicts: vnc-common (<< 3.3.7-6), vncserver (<< 3.3.6-1) +Description: Virtual network computing server software + VNC stands for Virtual Network Computing. It is, in essence, a remote + display system which allows you to view a computing `desktop' environment + not only on the machine where it is running, but from anywhere on the + Internet and from a wide variety of machine architectures. + . + It is implemented in a client/server model. This package provides common + utilities for the server and client packages. --- vnc4-4.1.1+xorg1.0.2.orig/debian/changelog +++ vnc4-4.1.1+xorg1.0.2/debian/changelog @@ -0,0 +1,138 @@ +vnc4 (4.1.1+xorg1.0.2-0ubuntu1.6.10.2) edgy-security; urgency=low + + * unix/vncserver: add "-extension XFIXES" (LP: #78282). + + -- Kees Cook Tue, 21 Aug 2007 09:04:53 -0700 + +vnc4 (4.1.1+xorg1.0.2-0ubuntu1.6.10.1) edgy-security; urgency=low + + * SECURITY UPDATE: Fix password-bypassing exploit. + - common/rfb/SConnection.cxx: Confirm that the requested authentication + method is actually valid. Patch taken from 4.1.2. + - References: + + CVE-2006-2369 + * Various fixes to fix FTBFSes on Edgy: + + debian/control: Fix Build-Depends. + + debian/rules: Fix bashisms. + + debian/patches/xorg-vnc-debian.patch: Modify to remove deprecated include + of asm/kbio.h, in lnx_{kbd,io}.c, fixes FTBFS on sparc. + + -- William Grant Sat, 6 Jan 2007 14:26:18 +1100 + +vnc4 (4.1.1+xorg1.0.2-0ubuntu1) dapper; urgency=low + + * Reupload 4.1.1-0ubuntu4 as 4.1.1+xorg1.0.2-0ubuntu1; the former + was erroneously overwritten with a sync from unstable (still + based on Xfree86, not xorg). + + -- Matthias Klose Mon, 29 May 2006 13:28:04 +0200 + +vnc4 (4.1.1-0ubuntu4) dapper; urgency=low + + * Update xorg-server to 1.0.2-0ubuntu9. + * Apply the Ubuntu patches. + * Add xorg-server's build dependencies to the build depenencies. + + -- Matthias Klose Mon, 8 May 2006 13:29:03 +0000 + +vnc4 (4.1.1-0ubuntu3) dapper; urgency=low + + * Update xorg-server to 1.0.2. + + -- Matthias Klose Thu, 30 Mar 2006 01:01:03 +0200 + +vnc4 (4.1.1-0ubuntu1) dapper; urgency=low + + * Unknown changes. + + -- Bjoern Brauel Tue, 24 Jan 2006 01:01:03 +0200 + +vnc4 (4.1.1-0ubuntu1) dapper; urgency=low + + * New upstream version. + + -- Matthias Klose Thu, 5 Jan 2006 18:54:14 +0100 + +vnc4 (4.0-8) unstable; urgency=medium + + * Added alternative for vncconfig, closes: #291591. + * Added menu entry, closes: #288054. + * Modified the vncinstall script so that it chmod files so that root + can modify them. This allow dh_strip to strip them. + + -- Ola Lundqvist Sat, 22 Jan 2005 10:55:33 +0100 + +vnc4 (4.0-7) unstable; urgency=low + + * Changed recommends of xfont-base to xfonts-base. Closes: #285483. + * Maintainer upload of -fPIC patch, closes: #283020. + * Now uses the work vncserver in the package description, closes: #284503. + + -- Ola Lundqvist Sat, 25 Dec 2004 21:33:58 +0100 + +vnc4 (4.0-6.1) unstable; urgency=high + + * Non-maintainer upload. + * High-urgency upload for sarge-targetted RC bugfix. + * Make sure everything that's included in vnc.so is built with -fPIC, + closes: #283020 + + -- Steve Langasek Tue, 14 Dec 2004 04:57:48 -0800 + +vnc4 (4.0-6) unstable; urgency=low + + * Added x dependencies, closes: #282521. + * Closed wrong bug in last upload, closes: #273739. + * Set BuildGlxExt to YES in xc/config/cf/vnc.def, closes: #269765. + * Added patch from Hein Roehrig to add + support for the -localhost option in x0vncserver as well. + + -- Ola Lundqvist Thu, 25 Nov 2004 20:39:21 +0100 + +vnc4 (4.0-5) unstable; urgency=low + + * Changed vncserver start script so it starts x-terminal-emulator and + x-window-manager instead of xterm and twm, closes: #273976. + * Moved in functionality from tightvncserver script. + This means that the options -clean, -fp, -alwaysshared, -nevershared + -httpport and -basehttpport is added. + * Fixed description of vnc4server package, closes: #73739. + + -- Ola Lundqvist Sun, 17 Oct 2004 20:58:47 +0200 + +vnc4 (4.0-4) unstable; urgency=medium + + * Fixed vncpasswd error in prerm of vnc4-common. + * Fixed x0vncserver error in prerm of vnc4server. + * Fixed vncviewer error in prerm of xvncviewer (was pointint at + xrealvncviewer instead xvnc4vewier). + * Added conflict with vnc-common << 3.3.7-6 because of + vncpasswd error there. + + -- Ola Lundqvist Thu, 16 Sep 2004 08:32:12 +0200 + +vnc4 (4.0-3) unstable; urgency=medium + + * Added dependency on vnc-common from vnc4server, closes: #270588. + + -- Ola Lundqvist Sat, 11 Sep 2004 11:59:23 +0200 + +vnc4 (4.0-2) unstable; urgency=medium + + * Now build libraries with -fPIC so vnc.so can be built properly, + closes: #266739. + * Removed tls build dep. Not needed. + + -- Ola Lundqvist Thu, 19 Aug 2004 12:07:12 +0200 + +vnc4 (4.0-1) unstable; urgency=low + + * Initial Release, closes: #250579, #260157. + Used some descriptions from the vnc package. + * This release fix a couple of issues in realvnc version 3. + - Broken on ia64, closes: #233313. + * Added source tar file of XFree86 (X420src-1.tgz). This is needed + in order to build Xvnc and vnc.so. I added this tar-file to the + orig tarball too in the xsrc dir. + + -- Ola Lundqvist Sun, 8 Aug 2004 14:54:54 +0200 --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4-common.postinst +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4-common.postinst @@ -0,0 +1,14 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + MAN=/usr/share/man/man1 + BIN=/usr/bin + update-alternatives --install \ + $BIN/vncpasswd vncpasswd $BIN/vnc4passwd 75 \ + --slave \ + $MAN/vncpasswd.1.gz vncpasswd.1.gz $MAN/vnc4passwd.1.gz +fi + +#DEBHELPER# + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/copyright +++ vnc4-4.1.1+xorg1.0.2/debian/copyright @@ -0,0 +1,182 @@ +This package was debianized by Ola Lundqvist on +Sun, 8 Aug 2004 14:54:54 +0200. + +It was downloaded from: + http://www.realvnc.com/ + +Copyright: + +Copyright (C) 2002-2004 RealVNC Ltd. All Rights Reserved. + + This software is distributed under the GNU General Public Licence as published + by the Free Software Foundation. See the file LICENCE.TXT (in the source + vnc4 source package) for the conditions under which this software is made + available. VNC also contains code from other sources. See the + Acknowledgements section below, and the individual files for details of the + conditions under which they are made available. + + You should have received a copy of the GNU General Public License with + your Debian GNU system, in /usr/share/common-licenses/GPL, or with the + Debian GNU source package as the file LICENSE.TXT. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307, USA. + +This distribution contains public domain DES software by Richard Outerbridge. +This is: + + Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. + (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. + + +This distribution contains software from the X Window System. This is: + + Copyright 1987, 1988, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall not be + used in advertising or otherwise to promote the sale, use or other dealings + in this Software without prior written authorization from The Open Group. + + + Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation, and that the name of Digital not be + used in advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + SOFTWARE. + + +This distribution contains zlib compression software. This is: + + Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + +This distribution contains Java DES software by Dave Zimmerman + and Jef Poskanzer . This is: + + Copyright (c) 1996 Widget Workshop, Inc. All Rights Reserved. + + Permission to use, copy, modify, and distribute this software and its + documentation for NON-COMMERCIAL or COMMERCIAL purposes and without fee + is hereby granted, provided that this copyright notice is kept intact. + + WIDGET WORKSHOP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE + SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WIDGET WORKSHOP SHALL NOT BE + LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, + MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. + + THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE + CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE + PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT + NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE + SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE + SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE + PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). WIDGET + WORKSHOP SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF + FITNESS FOR HIGH RISK ACTIVITIES. + + Copyright (C) 1996 by Jef Poskanzer . All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Visit the ACME Labs Java page for up-to-date versions of this and other + fine Java utilities: http://www.acme.com/java/ + +------------------------------------------------------------------------------- + +In addition to this the upstream source of XFree86 version 4.2.0 is included +in order to be able to build the Xvnc and vnc.so binaries. That software has +the following license and copyright information: + +Copyright (C) 1999,2000,2001 Compaq Computer Corporation +Copyright (C) 1999,2000,2001 Hewlett-Packard Company +Copyright (C) 1999,2000,2001 IBM Corporation +Copyright (C) 1999,2000,2001 Hummingbird Communications Ltd. +Copyright (C) 1999,2000,2001 Silicon Graphics, Inc. +Copyright (C) 1999,2000,2001 Sun Microsystems, Inc. +Copyright (C) 1999,2000,2001 The Open Group + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Soft- +ware"), to deal in the Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, provided that the above copyright +notice(s) and this permission notice appear in all copies of the Soft- +ware and that both the above copyright notice(s) and this permission +notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- +ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4server.install +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4server.install @@ -0,0 +1,9 @@ +debian/tmp/usr/bin/vnc4server usr/bin +debian/tmp/usr/bin/Xvnc4 usr/bin +debian/tmp/usr/bin/x0vnc4server usr/bin +debian/tmp/usr/bin/vnc4config usr/bin +debian/tmp/usr/lib/xorg usr/lib +debian/tmp/usr/share/man/man1/vnc4server.1 usr/share/man/man1 +debian/tmp/usr/share/man/man1/x0vnc4server.1 usr/share/man/man1 +debian/tmp/usr/share/man/man1/vnc4config.1 usr/share/man/man1 +debian/tmp/usr/share/man/man1/Xvnc4.1 usr/share/man/man1 --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4server.README.Debian +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4server.README.Debian @@ -0,0 +1,14 @@ +Note about vnc module and XF86Config + +This package install the vnc.so XFree86 version 4 module to the +/usr/X11R6/lib/modules/extensions directory and can be enabled like any other +module by adding a Load "vnc" line to the Module section of XF86Config. +The parameters listed in the Xvnc manual page can be set as options in +XF86Config e.g. Option "passwordFile" "/root/.vnc/passwd". +Note that for some reason options cannot be set in the Module section of +XF86Config - try the Screen section. + +You can also configure the vncserver by adding a vnc.conf file to /etc. +You can se a sample file in /usr/share/vnc4-common/examples/ + + -- Ola Lundqvist , Sun Oct 24 21:47:14 2004 --- vnc4-4.1.1+xorg1.0.2.orig/debian/xvnc4viewer.install +++ vnc4-4.1.1+xorg1.0.2/debian/xvnc4viewer.install @@ -0,0 +1,3 @@ +debian/tmp/usr/bin/xvnc4viewer usr/bin +debian/tmp/usr/share/man/man1/xvnc4viewer.1 usr/share/man/man1 + --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4server.postinst +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4server.postinst @@ -0,0 +1,26 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + MAN=/usr/share/man/man1 + BIN=/usr/bin + update-alternatives --install \ + $BIN/vncserver vncserver $BIN/vnc4server 65 \ + --slave \ + $MAN/vncserver.1.gz vncserver.1.gz $MAN/vnc4server.1.gz + update-alternatives --install \ + $BIN/Xvnc Xvnc $BIN/Xvnc4 75 \ + --slave \ + $MAN/Xvnc.1.gz Xvnc.1.gz $MAN/Xvnc4.1.gz + update-alternatives --install \ + $BIN/x0vncserver x0vncserver $BIN/x0vnc4server 75 \ + --slave \ + $MAN/x0vncserver.1.gz x0vncserver.1.gz $MAN/x0vnc4server.1.gz + update-alternatives --install \ + $BIN/vncconfig vncconfig $BIN/vnc4config 65 \ + --slave \ + $MAN/vncconfig.1.gz vncconfig.1.gz $MAN/vnc4config.1.gz +fi + +#DEBHELPER# + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/debian/compat +++ vnc4-4.1.1+xorg1.0.2/debian/compat @@ -0,0 +1 @@ +4 --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4-common.examples +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4-common.examples @@ -0,0 +1 @@ +debian/vnc.conf --- vnc4-4.1.1+xorg1.0.2.orig/debian/patches/vnc-4.0-x0vncserver-localhost.patch +++ vnc4-4.1.1+xorg1.0.2/debian/patches/vnc-4.0-x0vncserver-localhost.patch @@ -0,0 +1,34 @@ +From: Hein Roehrig + +Here is a patch to have the -localhost option in the x0vncserver +command as well... important when trying to secure the VNC connection +via ssh. + +Thanks, +Hein + +--- vnc4-4.0/x0vncserver/x0vncserver.cxx.~1~ 2004-10-23 10:59:42.000000000 -0600 ++++ vnc4-4.0/x0vncserver/x0vncserver.cxx 2004-10-23 11:48:41.000000000 -0600 +@@ -47,6 +47,9 @@ + StringParameter displayname("display", "The X display", ""); + IntParameter rfbport("rfbport", "TCP port to listen for RFB protocol",5900); + VncAuthPasswdFileParameter vncAuthPasswdFile; ++BoolParameter localhostOnly("localhost", ++ "Only allow connections from localhost", ++ false); + + static void CleanupSignalHandler(int sig) + { +@@ -230,7 +233,7 @@ + desktop.setVNCServer(&server); + + TcpSocket::initTcpSockets(); +- TcpListener listener((int)rfbport); ++ TcpListener listener((int)rfbport, localhostOnly); + vlog.info("Listening on port %d", (int)rfbport); + + while (true) { + + + + --- vnc4-4.1.1+xorg1.0.2.orig/debian/patches/xorg-vnc-debian.patch +++ vnc4-4.1.1+xorg1.0.2/debian/patches/xorg-vnc-debian.patch @@ -0,0 +1,189 @@ +diff -Naur xorg-server-1.0.0/configure.ac xorg-server-1.0.0-patched/configure.ac +--- xorg-server-1.0.0/configure.ac 2005-12-15 01:20:27.000000000 +0100 ++++ xorg-server-1.0.0-patched/configure.ac 2006-01-24 02:02:40.000000000 +0100 +@@ -339,9 +339,9 @@ + AC_ARG_WITH(mesa-source, AS_HELP_STRING([--with-mesa-source=MESA_SOURCE], [Path to Mesa source tree]), + [ MESA_SOURCE="$withval" ], + [ MESA_SOURCE="" ]) +-AC_ARG_WITH(fontdir, AS_HELP_STRING([--with-fontdir=FONTDIR], [Path to top level dir where fonts are installed (default: ${libdir}/X11/fonts)]), ++AC_ARG_WITH(fontdir, AS_HELP_STRING([--with-fontdir=FONTDIR], [Path to top level dir where fonts are installed (default: ${datadir}/X11/fonts)]), + [ FONTDIR="$withval" ], +- [ FONTDIR="${libdir}/X11/fonts" ]) ++ [ FONTDIR="${datadir}/X11/fonts" ]) + DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/CID/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" + AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), + [ FONTPATH="$withval" ], +@@ -1454,6 +1454,7 @@ + hw/xnest/Makefile + hw/xwin/Makefile + hw/darwin/Makefile ++hw/vnc/Makefile + Xprint/Makefile + Xprint/doc/Makefile + Xprint/pcl/Makefile +diff -Naur xorg-server-1.0.0/hw/Makefile.am xorg-server-1.0.0-patched/hw/Makefile.am +--- xorg-server-1.0.0/hw/Makefile.am 2005-10-07 16:27:46.000000000 +0200 ++++ xorg-server-1.0.0-patched/hw/Makefile.am 2006-01-24 02:02:17.000000000 +0100 +@@ -18,6 +18,8 @@ + XWIN_SUBDIRS = xwin + endif + ++XVNC_SUBDIRS = vnc ++ + # need to add darwin support here + + SUBDIRS = \ +@@ -25,6 +27,7 @@ + $(XWIN_SUBDIRS) \ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ ++ $(XVNC_SUBDIRS) \ + $(DMX_SUBDIRS) + + DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin +diff -Naur xorg-server-1.0.0/hw/vnc/Makefile.am xorg-server-1.0.0-patched/hw/vnc/Makefile.am +--- xorg-server-1.0.0/hw/vnc/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ xorg-server-1.0.0-patched/hw/vnc/Makefile.am 2006-01-24 02:02:17.000000000 +0100 +@@ -0,0 +1,87 @@ ++noinst_LTLIBRARIES = libvnccommon.la ++libvnccommon_la_SOURCES = \ ++ RegionHelper.h \ ++ vncExtInit.cc \ ++ vncExtInit.h \ ++ vncHooks.cc \ ++ vncHooks.h \ ++ XserverDesktop.cc \ ++ XserverDesktop.h ++ ++libvnccommon_la_CXXFLAGS = \ ++ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ ++ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ ++ -DGC_HAS_COMPOSITE_CLIP \ ++ -DVNC_USE_FB \ ++ -I/usr/include/X11 \ ++ -I../../../common \ ++ -I../../../unix/vncconfig ++ ++bin_PROGRAMS = Xvnc ++ ++Xvnc_SOURCES = \ ++ xvnc.cc \ ++ $(top_srcdir)/Xext/dpmsstubs.c \ ++ $(top_srcdir)/Xi/stubs.c \ ++ $(top_srcdir)/mi/miinitext.c \ ++ $(top_srcdir)/fb/fbcmap.c ++ ++Xvnc_LDADD = $(XORG_CORE_LIBS) \ ++ $(XORG_LIBS) \ ++ $(XSERVER_LIBS) \ ++ ../../fb/libfb.la \ ++ ../../mi/libminimi.la \ ++ ../../render/librender.la \ ++ ../../xkb/libxkbstubs.la \ ++ ../../dbe/libdbe.la \ ++ ../../Xext/libXext.la \ ++ ../../XTrap/libxtrap.la \ ++ ../../record/librecord.la \ ++ ../xfree86/os-support/libxorgos.la \ ++ ../../os/libos.la \ ++ ../xfree86/common/libcommon.a \ ++ -lX11 \ ++ libvnccommon.la \ ++ ../../../common/rfb/librfb.a \ ++ ../../../common/rdr/librdr.a \ ++ ../../../common/network/libnetwork.a \ ++ ../../../common/Xregion/libXregion.a ++ ++Xvnc_CFLAGS = -DHAVE_DIX_CONFIG_H \ ++ -DNO_HW_ONLY_EXTS \ ++ -DNO_MODULE_EXTS \ ++ -DXFree86Server -DVNCEXT ++ ++Xvnc_CXXFLAGS = $(Xvnc_CFLAGS) \ ++ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ ++ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ ++ -DVNC_USE_FB \ ++ -I../../../common \ ++ -I../../../unix/vncconfig \ ++ -I../../mi \ ++ -I ../../render \ ++ -I/usr/include/X11 ++ ++libvnc_la_LTLIBRARIES = libvnc.la ++libvnc_la_LDFLAGS = -module -avoid-version ++libvnc_ladir = $(moduledir)/extensions ++libvnc_la_SOURCES = xf86vncModule.cc ++libvnc_la_LIBADD = \ ++ libvnccommon.la \ ++ ../../../common/rfb/librfb.a \ ++ ../../../common/rdr/librdr.a \ ++ ../../../common/network/libnetwork.a \ ++ ../../../common/Xregion/libXregion.a ++libvnc_la_CXXFLAGS = \ ++ -I../../../common \ ++ -I$(top_srcdir)/hw/xfree86/common \ ++ -I$(top_srcdir)/hw/xfree86/os-support \ ++ -I$(top_srcdir)/hw/xfree86/os-support/bus \ ++ -DXFree86Module -DXFree86LOADER -DIN_MODULE ++ ++INCLUDES = $(XORG_INCS) ++ ++AM_CXXFLAGS = $(CFLAGS) \ ++ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ ++ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" ++ +diff -Naur xorg-server-1.0.0/mi/miinitext.c xorg-server-1.0.0-patched/mi/miinitext.c +--- xorg-server-1.0.0/mi/miinitext.c 2005-07-16 05:49:59.000000000 +0200 ++++ xorg-server-1.0.0-patched/mi/miinitext.c 2006-01-24 02:02:32.000000000 +0100 +@@ -284,6 +284,9 @@ + #ifdef MITMISC + extern void MITMiscExtensionInit(INITARGS); + #endif ++#ifdef VNCEXT ++extern void vncExtensionInit(INITARGS); ++#endif + #ifdef XIDLE + extern void XIdleExtensionInit(INITARGS); + #endif +@@ -567,6 +570,9 @@ + #ifdef MITMISC + if (!noMITMiscExtension) MITMiscExtensionInit(); + #endif ++#ifdef VNCEXT ++ vncExtensionInit(); ++#endif + #ifdef XIDLE + if (!noXIdleExtension) XIdleExtensionInit(); + #endif +diff -Naur xorg-server-1.0.0/hw/xfree86/os-support/linux/lnx_io.c xorg-server-1.0.0-patched/hw/xfree86/os-support/linux/lnx_io.c +--- xorg-server-1.0.0/hw/xfree86/os-support/linux/lnx_io.c 2005-08-26 17:24:21.000000000 +1000 ++++ xorg-server-1.0.0-patched/hw/xfree86/os-support/linux/lnx_io.c 2007-01-06 14:23:50.000000000 +1100 +@@ -74,7 +74,6 @@ + #include + #ifdef __sparc__ + #include +-#include + #endif + + /* Deal with spurious kernel header change in struct kbd_repeat. +diff -Naur xorg-server-1.0.0/hw/xfree86/os-support/linux/lnx_kbd.c xorg-server-1.0.0-patched/hw/xfree86/os-support/linux/lnx_kbd.c +--- xorg-server-1.0.0/hw/xfree86/os-support/linux/lnx_kbd.c 2005-08-26 17:24:21.000000000 +1000 ++++ xorg-server-1.0.0-patched/hw/xfree86/os-support/linux/lnx_kbd.c 2007-01-06 14:23:50.000000000 +1100 +@@ -104,7 +104,6 @@ + #include + #ifdef __sparc__ + #include +-#include + #endif + + /* Deal with spurious kernel header change in struct kbd_repeat. +diff -Naur xorg-server-1.0.0/hw/xfree86/int10/Makefile.am xorg-server-1.0.0-patched/hw/xfree86/int10/Makefile.am +--- xorg-server-1.0.0/hw/xfree86/int10/Makefile.am 2005-12-02 07:02:41.000000000 +0100 ++++ xorg-server-1.0.0-patched/hw/xfree86/int10/Makefile.am 2006-01-24 03:01:56.000000000 +0100 +@@ -28,6 +28,7 @@ + + if INT10_STUB + AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS) $(EXTRA_CFLAGS) ++INCLUDES = $(XORG_INCS) + libint10_la_SOURCES = stub.c xf86int10module.c + endif --- vnc4-4.1.1+xorg1.0.2.orig/debian/patches/vncserver +++ vnc4-4.1.1+xorg1.0.2/debian/patches/vncserver @@ -0,0 +1,570 @@ +#!/usr/bin/perl +# +# Copyright (C) 2002-2003 RealVNC Ltd. +# Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +# +# This 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. +# +# This software 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 software; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +# USA. +# + +# +# vncserver - wrapper script to start an X VNC server. +# + +# +# First make sure we're operating in a sane environment. +# + +&SanityCheck(); + +# +# Global variables. You may want to configure some of these for your site. +# + +$geometry = "1024x768"; +$depth = 16; +$vncJavaFiles = (((-d "/usr/share/vnc/classes") && "/usr/share/vnc/classes") || + ((-d "/usr/local/vnc/classes") && "/usr/local/vnc/classes")); +$vncUserDir = "$ENV{HOME}/.vnc"; +$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority"; + +$defaultXStartup + = ("#!/bin/sh\n\n". + "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n". + "xsetroot -solid grey\n". + "vncconfig -iconic &\n". + "x-terminal-emulator -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n". + "x-window-manager &\n"); + +chop($host = `uname -n`); + + +# Check command line options + +&ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1, + "-help",0,"-h",0,"--help",0); + +&Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'}); + +&Kill() if ($opt{'-kill'}); + +# Uncomment this line if you want default geometry, depth and pixelformat +# to match the current X display: +# &GetXDisplayDefaults(); + +if ($opt{'-geometry'}) { + $geometry = $opt{'-geometry'}; +} +if ($opt{'-depth'}) { + $depth = $opt{'-depth'}; + $pixelformat = ""; +} +if ($opt{'-pixelformat'}) { + $pixelformat = $opt{'-pixelformat'}; +} + +&CheckGeometryAndDepth(); + + +# Create the user's vnc directory if necessary. + +if (!(-e $vncUserDir)) { + if (!mkdir($vncUserDir,0755)) { + die "$prog: Could not create $vncUserDir.\n"; + } +} + +# Make sure the user has a password. + +($z,$z,$mode) = stat("$vncUserDir/passwd"); +if (!(-e "$vncUserDir/passwd") || ($mode & 077)) { + warn "\nYou will require a password to access your desktops.\n\n"; + system("vncpasswd -q $vncUserDir/passwd"); + if (($? >> 8) != 0) { + exit 1; + } +} + +# Find display number. + +if ((@ARGV > 0) && ($ARGV[0] =~ /^:(\d+)$/)) { + $displayNumber = $1; + shift(@ARGV); + if (!&CheckDisplayNumber($displayNumber)) { + die "A VNC server is already running as :$displayNumber\n"; + } +} elsif ((@ARGV > 0) && ($ARGV[0] !~ /^-/)) { + &Usage(); +} else { + $displayNumber = &GetDisplayNumber(); +} + +$vncPort = 5900 + $displayNumber; + +$desktopLog = "$vncUserDir/$host:$displayNumber.log"; +unlink($desktopLog); + +# Make an X server cookie - use as the seed the sum of the current time, our +# PID and part of the encrypted form of the password. Ideally we'd use +# /dev/urandom, but that's only available on Linux. + +srand(time+$$+unpack("L",`cat $vncUserDir/passwd`)); +$cookie = ""; +for (1..16) { + $cookie .= sprintf("%02x", int(rand(256)) % 256); +} + +system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie"); +system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie"); + +if ($opt{'-name'}) { + $desktopName = $opt{'-name'}; +} else { + $desktopName = "$host:$displayNumber ($ENV{USER})"; +} + +# Now start the X VNC Server + +$cmd = "Xvnc :$displayNumber"; +$cmd .= " -desktop " . "edString($desktopName); +$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles); +$cmd .= " -auth $xauthorityFile"; +$cmd .= " -geometry $geometry" if ($geometry); +$cmd .= " -depth $depth" if ($depth); +$cmd .= " -pixelformat $pixelformat" if ($pixelformat); +$cmd .= " -rfbwait 30000"; +$cmd .= " -rfbauth $vncUserDir/passwd"; +$cmd .= " -rfbport $vncPort"; +$cmd .= " -pn"; + +# Add font path and color database stuff here, e.g.: +# +# $cmd .= " -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/"; +# $cmd .= " -co /usr/lib/X11/rgb"; +# + +foreach $arg (@ARGV) { + $cmd .= " " . "edString($arg); +} +$cmd .= " >> " . "edString($desktopLog) . " 2>&1"; + +# Run $cmd and record the process ID. + +$pidFile = "$vncUserDir/$host:$displayNumber.pid"; +system("$cmd & echo \$! >$pidFile"); + +# Give Xvnc a chance to start up + +sleep(3); + +warn "\nNew '$desktopName' desktop is $host:$displayNumber\n\n"; + +# Create the user's xstartup script if necessary. + +if (!(-e "$vncUserDir/xstartup")) { + warn "Creating default startup script $vncUserDir/xstartup\n"; + open(XSTARTUP, ">$vncUserDir/xstartup"); + print XSTARTUP $defaultXStartup; + close(XSTARTUP); + chmod 0755, "$vncUserDir/xstartup"; +} + +# Run the X startup script. + +warn "Starting applications specified in $vncUserDir/xstartup\n"; +warn "Log file is $desktopLog\n\n"; + +# If the unix domain socket exists then use that (DISPLAY=:n) otherwise use +# TCP (DISPLAY=host:n) + +if (-e "/tmp/.X11-unix/X$displayNumber" || + -e "/usr/spool/sockets/X11/$displayNumber") +{ + $ENV{DISPLAY}= ":$displayNumber"; +} else { + $ENV{DISPLAY}= "$host:$displayNumber"; +} +$ENV{VNCDESKTOP}= $desktopName; + +system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " 2>&1 &"); + +exit; + + +############################################################################### +# +# CheckGeometryAndDepth simply makes sure that the geometry and depth values +# are sensible. +# + +sub CheckGeometryAndDepth +{ + if ($geometry =~ /^(\d+)x(\d+)$/) { + $width = $1; $height = $2; + + if (($width<1) || ($height<1)) { + die "$prog: geometry $geometry is invalid\n"; + } + + while (($width % 4)!=0) { + $width = $width + 1; + } + + while (($height % 2)!=0) { + $height = $height + 1; + } + + $geometry = "${width}x$height"; + } else { + die "$prog: geometry $geometry is invalid\n"; + } + + if (($depth < 8) || ($depth > 32)) { + die "Depth must be between 8 and 32\n"; + } +} + + +# +# GetDisplayNumber gets the lowest available display number. A display number +# n is taken if something is listening on the VNC server port (5900+n) or the +# X server port (6000+n). +# + +sub GetDisplayNumber +{ + foreach $n (1..99) { + if (&CheckDisplayNumber($n)) { + return $n+0; # Bruce Mah's workaround for bug in perl 5.005_02 + } + } + + die "$prog: no free display number on $host.\n"; +} + + +# +# CheckDisplayNumber checks if the given display number is available. A +# display number n is taken if something is listening on the VNC server port +# (5900+n) or the X server port (6000+n). +# + +sub CheckDisplayNumber +{ + local ($n) = @_; + + socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n"; + eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))'; + if (!bind(S, pack('S n x12', $AF_INET, 6000 + $n))) { + close(S); + return 0; + } + close(S); + + socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n"; + eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))'; + if (!bind(S, pack('S n x12', $AF_INET, 5900 + $n))) { + close(S); + return 0; + } + close(S); + + if (-e "/tmp/.X$n-lock") { + warn "\nWarning: $host:$n is taken because of /tmp/.X$n-lock\n"; + warn "Remove this file if there is no X server $host:$n\n"; + return 0; + } + + if (-e "/tmp/.X11-unix/X$n") { + warn "\nWarning: $host:$n is taken because of /tmp/.X11-unix/X$n\n"; + warn "Remove this file if there is no X server $host:$n\n"; + return 0; + } + + if (-e "/usr/spool/sockets/X11/$n") { + warn("\nWarning: $host:$n is taken because of ". + "/usr/spool/sockets/X11/$n\n"); + warn "Remove this file if there is no X server $host:$n\n"; + return 0; + } + + return 1; +} + + +# +# GetXDisplayDefaults uses xdpyinfo to find out the geometry, depth and pixel +# format of the current X display being used. If successful, it sets the +# options as appropriate so that the X VNC server will use the same settings +# (minus an allowance for window manager decorations on the geometry). Using +# the same depth and pixel format means that the VNC server won't have to +# translate pixels when the desktop is being viewed on this X display (for +# TrueColor displays anyway). +# + +sub GetXDisplayDefaults +{ + local (@lines, @matchlines, $width, $height, $defaultVisualId, $i, + $red, $green, $blue); + + $wmDecorationWidth = 4; # a guess at typical size for window manager + $wmDecorationHeight = 24; # decoration size + + return if (!defined($ENV{DISPLAY})); + + @lines = `xdpyinfo 2>/dev/null`; + + return if ($? != 0); + + @matchlines = grep(/dimensions/, @lines); + if (@matchlines) { + ($width, $height) = ($matchlines[0] =~ /(\d+)x(\d+) pixels/); + + $width -= $wmDecorationWidth; + $height -= $wmDecorationHeight; + + $geometry = "${width}x$height"; + } + + @matchlines = grep(/default visual id/, @lines); + if (@matchlines) { + ($defaultVisualId) = ($matchlines[0] =~ /id:\s+(\S+)/); + + for ($i = 0; $i < @lines; $i++) { + if ($lines[$i] =~ /^\s*visual id:\s+$defaultVisualId$/) { + if (($lines[$i+1] !~ /TrueColor/) || + ($lines[$i+2] !~ /depth/) || + ($lines[$i+4] !~ /red, green, blue masks/)) + { + return; + } + last; + } + } + + return if ($i >= @lines); + + ($depth) = ($lines[$i+2] =~ /depth:\s+(\d+)/); + ($red,$green,$blue) + = ($lines[$i+4] + =~ /masks:\s+0x([0-9a-f]+), 0x([0-9a-f]+), 0x([0-9a-f]+)/); + + $red = hex($red); + $green = hex($green); + $blue = hex($blue); + + if ($red > $blue) { + $red = int(log($red) / log(2)) - int(log($green) / log(2)); + $green = int(log($green) / log(2)) - int(log($blue) / log(2)); + $blue = int(log($blue) / log(2)) + 1; + $pixelformat = "rgb$red$green$blue"; + } else { + $blue = int(log($blue) / log(2)) - int(log($green) / log(2)); + $green = int(log($green) / log(2)) - int(log($red) / log(2)); + $red = int(log($red) / log(2)) + 1; + $pixelformat = "bgr$blue$green$red"; + } + } +} + + +# +# quotedString returns a string which yields the original string when parsed +# by a shell. +# + +sub quotedString +{ + local ($in) = @_; + + $in =~ s/\'/\'\"\'\"\'/g; + + return "'$in'"; +} + + +# +# removeSlashes turns slashes into underscores for use as a file name. +# + +sub removeSlashes +{ + local ($in) = @_; + + $in =~ s|/|_|g; + + return "$in"; +} + + +# +# Usage +# + +sub Usage +{ + die("\nusage: $prog [:] [-name ] [-depth ]\n". + " [-geometry x]\n". + " [-pixelformat rgbNNN|bgrNNN]\n". + " ...\n\n". + " $prog -kill \n\n"); +} + + +# +# Kill +# + +sub Kill +{ + $opt{'-kill'} =~ s/(:\d+)\.\d+$/$1/; # e.g. turn :1.0 into :1 + + if ($opt{'-kill'} =~ /^:\d+$/) { + $pidFile = "$vncUserDir/$host$opt{'-kill'}.pid"; + } else { + if ($opt{'-kill'} !~ /^$host:/) { + die "\nCan't tell if $opt{'-kill'} is on $host\n". + "Use -kill : instead\n\n"; + } + $pidFile = "$vncUserDir/$opt{'-kill'}.pid"; + } + + if (! -r $pidFile) { + die "\nCan't find file $pidFile\n". + "You'll have to kill the Xvnc process manually\n\n"; + } + + $SIG{'HUP'} = 'IGNORE'; + chop($pid = `cat $pidFile`); + warn "Killing Xvnc process ID $pid\n"; + system("kill $pid"); + unlink $pidFile; + exit; +} + + +# +# ParseOptions takes a list of possible options and a boolean indicating +# whether the option has a value following, and sets up an associative array +# %opt of the values of the options given on the command line. It removes all +# the arguments it uses from @ARGV and returns them in @optArgs. +# + +sub ParseOptions +{ + local (@optval) = @_; + local ($opt, @opts, %valFollows, @newargs); + + while (@optval) { + $opt = shift(@optval); + push(@opts,$opt); + $valFollows{$opt} = shift(@optval); + } + + @optArgs = (); + %opt = (); + + arg: while (defined($arg = shift(@ARGV))) { + foreach $opt (@opts) { + if ($arg eq $opt) { + push(@optArgs, $arg); + if ($valFollows{$opt}) { + if (@ARGV == 0) { + &Usage(); + } + $opt{$opt} = shift(@ARGV); + push(@optArgs, $opt{$opt}); + } else { + $opt{$opt} = 1; + } + next arg; + } + } + push(@newargs,$arg); + } + + @ARGV = @newargs; +} + + +# +# Routine to make sure we're operating in a sane environment. +# + +sub SanityCheck +{ + local ($cmd); + + # + # Get the program name + # + + ($prog) = ($0 =~ m|([^/]+)$|); + + # + # Check we have all the commands we'll need on the path. + # + + cmd: + foreach $cmd ("uname","xauth","Xvnc","vncpasswd") { + for (split(/:/,$ENV{PATH})) { + if (-x "$_/$cmd") { + next cmd; + } + } + die "$prog: couldn't find \"$cmd\" on your PATH.\n"; + } + + # + # Check the HOME environment variable is set + # + + if (!defined($ENV{HOME})) { + die "$prog: The HOME environment variable is not set.\n"; + } + chdir($ENV{HOME}); + + # + # Find socket constants. 'use Socket' is a perl5-ism, so we wrap it in an + # eval, and if it fails we try 'require "sys/socket.ph"'. If this fails, + # we just guess at the values. If you find perl moaning here, just + # hard-code the values of AF_INET and SOCK_STREAM. You can find these out + # for your platform by looking in /usr/include/sys/socket.h and related + # files. + # + + chop($os = `uname`); + chop($osrev = `uname -r`); + + eval 'use Socket'; + if ($@) { + eval 'require "sys/socket.ph"'; + if ($@) { + if (($os eq "SunOS") && ($osrev !~ /^4/)) { + $AF_INET = 2; + $SOCK_STREAM = 2; + } else { + $AF_INET = 2; + $SOCK_STREAM = 1; + } + } else { + $AF_INET = &AF_INET; + $SOCK_STREAM = &SOCK_STREAM; + } + } else { + $AF_INET = &AF_INET; + $SOCK_STREAM = &SOCK_STREAM; + } +} --- vnc4-4.1.1+xorg1.0.2.orig/debian/patches/vnc-4.0b5-vncviewer-tls.diff +++ vnc4-4.1.1+xorg1.0.2/debian/patches/vnc-4.0b5-vncviewer-tls.diff @@ -0,0 +1,836 @@ +--- vnc-4.0b5-unixsrc/x0vncserver/Makefile.in.tls 2004-06-11 16:36:08.113307745 +0100 ++++ vnc-4.0b5-unixsrc/x0vncserver/Makefile.in 2004-06-11 16:36:46.864918325 +0100 +@@ -7,9 +7,9 @@ + + DEP_LIBS = ../rfb/librfb.a ../network/libnetwork.a ../rdr/librdr.a + +-EXTRA_LIBS = @ZLIB_LIB@ @X_PRE_LIBS@ @X_LIBS@ -lXtst -lXext -lX11 @X_EXTRA_LIBS@ ++EXTRA_LIBS = @ZLIB_LIB@ @X_PRE_LIBS@ @X_LIBS@ -lXtst -lXext -lX11 @X_EXTRA_LIBS@ @LIBGNUTLS_LIBS@ + +-DIR_CPPFLAGS = -I$(top_srcdir) @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS ++DIR_CPPFLAGS = -I$(top_srcdir) @X_CFLAGS@ @LIBGNUTLS_CFLAGS@ # X_CFLAGS are really CPPFLAGS + + all:: $(program) + +--- vnc-4.0b5-unixsrc/configure.in.tls 2004-06-11 16:36:08.147303017 +0100 ++++ vnc-4.0b5-unixsrc/configure.in 2004-06-11 16:36:46.865918186 +0100 +@@ -63,6 +63,14 @@ + AC_SUBST(ZLIB_INCLUDE) + AC_SUBST(ZLIB_LIB) + ++AC_ARG_ENABLE(gnutls, [ --enable-gnutls build with gnutls support]) ++if test "x$enable_gnutls" = "xyes"; then ++ AC_LANG_PUSH(C) ++ AM_PATH_LIBGNUTLS(1.0.0, [AC_DEFINE(HAVE_GNUTLS)], AC_MSG_ERROR([Unable to find GNUTLS])) ++ LIBGNUTLS_CFLAGS="-DHAVE_GNUTLS $LIBGNUTLS_CFLAGS" ++ AC_LANG_PUSH(C) ++fi ++ + AC_CHECK_FUNC(vsnprintf,VSNPRINTF_DEFINE='-DHAVE_VSNPRINTF',VSNPRINTF_DEFINE=) + AC_SUBST(VSNPRINTF_DEFINE) + +--- vnc-4.0b5-unixsrc/rfb/CSecurity.h.tls 2004-06-11 16:36:08.167300236 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CSecurity.h 2004-06-11 16:36:46.867917908 +0100 +@@ -38,8 +38,14 @@ + class CConnection; + class CSecurity { + public: ++ enum statusEnum { ++ RFB_SECURITY_ERROR, ++ RFB_SECURITY_COMPLETED, ++ RFB_SECURITY_DEFER, ++ RFB_SECURITY_AUTH_TYPES ++ }; + virtual ~CSecurity() {} +- virtual bool processMsg(CConnection* cc, bool* done)=0; ++ virtual statusEnum processMsg(CConnection* cc)=0; + virtual void destroy() { delete this; } + virtual int getType() const = 0; + virtual const char* description() const = 0; +--- vnc-4.0b5-unixsrc/rfb/CSecurityTLS.cxx.tls 2004-06-11 16:36:36.557351881 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CSecurityTLS.cxx 2004-06-11 16:36:46.868917769 +0100 +@@ -0,0 +1,122 @@ ++/* ++ * Copyright (C) 2004 Red Hat Inc. ++ * ++ * This 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. ++ * ++ * This software 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 software; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ * USA. ++ */ ++ ++#ifdef HAVE_GNUTLS ++ ++#include ++#include ++#include ++#include ++#include ++ ++#undef TLS_DEBUG ++ ++using namespace rfb; ++ ++static LogWriter vlog("TLS"); ++ ++#ifdef TLS_DEBUG ++static void debug_log(int level, const char* str) ++{ ++ vlog.debug(str); ++} ++#endif ++ ++void CSecurityTLS::initGlobal() ++{ ++ static bool globalInitDone = false; ++ ++ if (!globalInitDone) { ++ gnutls_global_init(); ++ ++#ifdef TLS_DEBUG ++ gnutls_global_set_log_level(10); ++ gnutls_global_set_log_function(debug_log); ++#endif ++ ++ globalInitDone = true; ++ } ++} ++ ++CSecurityTLS::CSecurityTLS() : session(0), anon_cred(0) ++{ ++} ++ ++CSecurityTLS::~CSecurityTLS() ++{ ++ if (session) { ++ gnutls_bye(session, GNUTLS_SHUT_RDWR); ++ gnutls_anon_free_client_credentials (anon_cred); ++ gnutls_deinit (session); ++ } ++ ++ /* FIXME: should be doing gnutls_global_deinit() at some point */ ++} ++ ++CSecurityTLS::statusEnum CSecurityTLS::processMsg(CConnection* cc) ++{ ++ rdr::FdInStream* is; ++ rdr::FdOutStream* os; ++ ++ if ((is = dynamic_cast(cc->getInStream())) == 0) { ++ vlog.error("Cannot use TLS security type with anything other than FdInStream"); ++ return RFB_SECURITY_ERROR; ++ } ++ ++ if ((os = dynamic_cast(cc->getOutStream())) == 0) { ++ vlog.error("Cannot use TLS security type with anything other than FdOutStream"); ++ return RFB_SECURITY_ERROR; ++ } ++ ++ initGlobal(); ++ ++ gnutls_init(&session, GNUTLS_CLIENT); ++ gnutls_set_default_priority(session); ++ ++ int kx_priority[] = { GNUTLS_KX_ANON_DH, 0 }; ++ gnutls_kx_set_priority(session, kx_priority); ++ ++ gnutls_anon_allocate_client_credentials(&anon_cred); ++ gnutls_credentials_set(session, GNUTLS_CRD_ANON, anon_cred); ++ ++ gnutls_transport_set_ptr2(session, ++ (gnutls_transport_ptr)is->getFd(), ++ (gnutls_transport_ptr)os->getFd()); ++ ++ int err; ++ do { ++ err = gnutls_handshake(session); ++ } while (err != GNUTLS_E_SUCCESS && !gnutls_error_is_fatal(err)); ++ ++ if (err != GNUTLS_E_SUCCESS) { ++ vlog.error("TLS Handshake failed: %s\n", gnutls_strerror (err)); ++ gnutls_bye(session, GNUTLS_SHUT_RDWR); ++ gnutls_anon_free_client_credentials(anon_cred); ++ gnutls_deinit(session); ++ session = 0; ++ return RFB_SECURITY_ERROR; ++ } ++ ++ is->useTLS(session); ++ os->useTLS(session); ++ ++ return RFB_SECURITY_AUTH_TYPES; ++} ++ ++#endif /* HAVE_GNUTLS */ +--- vnc-4.0b5-unixsrc/rfb/CConnection.h.tls 2004-06-11 16:36:08.248288973 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CConnection.h 2004-06-11 16:36:46.869917630 +0100 +@@ -59,6 +59,11 @@ + // first one is most preferred. + void addSecType(rdr::U8 secType); + ++ // addAuthType() should be called once for each authentication type which ++ // the client supports. The order in which they're added is such that the ++ // first one is most preferred. ++ void addAuthType(rdr::U8 authType); ++ + // setClientSecTypeOrder() determines whether the client should obey + // the server's security type preference, by picking the first server security + // type that the client supports, or whether it should pick the first type +@@ -150,6 +155,7 @@ + private: + void processVersionMsg(); + void processSecurityTypesMsg(); ++ void processAuthTypesMsg(); + void processSecurityMsg(); + void processSecurityResultMsg(); + void processInitMsg(); +@@ -164,9 +170,11 @@ + bool deleteStreamsWhenDone; + bool shared; + CSecurity* security; +- enum { maxSecTypes = 8 }; ++ enum { maxSecTypes = 8, maxAuthTypes = 8 }; + int nSecTypes; + rdr::U8 secTypes[maxSecTypes]; ++ int nAuthTypes; ++ rdr::U8 authTypes[maxAuthTypes]; + bool clientSecTypeOrder; + stateEnum state_; + +--- vnc-4.0b5-unixsrc/rfb/Makefile.in.tls 2004-06-11 16:36:08.250288695 +0100 ++++ vnc-4.0b5-unixsrc/rfb/Makefile.in 2004-06-11 16:36:46.869917630 +0100 +@@ -8,6 +8,7 @@ + CMsgWriter.cxx \ + CMsgWriterV3.cxx \ + CSecurityVncAuth.cxx \ ++ CSecurityTLS.cxx \ + ComparingUpdateTracker.cxx \ + Configuration.cxx \ + ConnParams.cxx \ +@@ -52,7 +53,7 @@ + + OBJS = d3des.o $(CXXSRCS:.cxx=.o) + +-DIR_CPPFLAGS = -I$(top_srcdir) @VSNPRINTF_DEFINE@ ++DIR_CPPFLAGS = -I$(top_srcdir) @VSNPRINTF_DEFINE@ @LIBGNUTLS_CFLAGS@ + + library = librfb.a + +@@ -63,4 +64,6 @@ + $(AR) $(library) $(OBJS) + $(RANLIB) $(library) + ++DIR_CFLAGS = -DPIC -fPIC ++DIR_CXXFLAGS = -DPIC -fPIC + # followed by boilerplate.mk +--- vnc-4.0b5-unixsrc/rfb/CSecurityVncAuth.cxx.tls 2004-06-11 16:36:08.252288416 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CSecurityVncAuth.cxx 2004-06-11 16:36:46.869917630 +0100 +@@ -41,9 +41,8 @@ + { + } + +-bool CSecurityVncAuth::processMsg(CConnection* cc, bool* done) ++CSecurity::statusEnum CSecurityVncAuth::processMsg(CConnection* cc) + { +- *done = false; + rdr::InStream* is = cc->getInStream(); + rdr::OutStream* os = cc->getOutStream(); + +@@ -52,12 +51,11 @@ + CharArray passwd; + if (!upg->getUserPasswd(0, &passwd.buf)) { + vlog.error("Getting password failed"); +- return false; ++ return RFB_SECURITY_ERROR; + } + vncAuthEncryptChallenge(challenge, passwd.buf); + memset(passwd.buf, 0, strlen(passwd.buf)); + os->writeBytes(challenge, vncAuthChallengeSize); + os->flush(); +- *done = true; +- return true; ++ return RFB_SECURITY_COMPLETED; + } +--- vnc-4.0b5-unixsrc/rfb/secTypes.cxx.tls 2004-06-11 16:36:08.254288138 +0100 ++++ vnc-4.0b5-unixsrc/rfb/secTypes.cxx 2004-06-11 16:36:46.870917491 +0100 +@@ -28,6 +28,7 @@ + if (strcasecmp(name, "VncAuth") == 0) return secTypeVncAuth; + if (strcasecmp(name, "RA2") == 0) return secTypeRA2; + if (strcasecmp(name, "RA2ne") == 0) return secTypeRA2ne; ++ if (strcasecmp(name, "TLS") == 0) return secTypeTLS; + return secTypeInvalid; + } + +@@ -38,6 +39,7 @@ + case secTypeVncAuth: return "VncAuth"; + case secTypeRA2: return "RA2"; + case secTypeRA2ne: return "RA2ne"; ++ case secTypeTLS: return "TLS"; + default: return "[unknown secType]"; + } + } +@@ -46,6 +48,7 @@ + { + switch (num) { + case secTypeRA2: return true; ++ case secTypeTLS: return true; + default: return false; + } + } +--- vnc-4.0b5-unixsrc/rfb/CSecurityTLS.h.tls 2004-06-11 16:36:31.135105991 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CSecurityTLS.h 2004-06-11 16:36:46.870917491 +0100 +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (C) 2004 Red Hat Inc. ++ * ++ * This 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. ++ * ++ * This software 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 software; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ * USA. ++ */ ++ ++#ifndef __C_SECURITY_TLS_H__ ++#define __C_SECURITY_TLS_H__ ++ ++#ifdef HAVE_GNUTLS ++ ++#include ++#include ++#include ++ ++namespace rfb { ++ class CSecurityTLS : public CSecurity { ++ public: ++ CSecurityTLS(); ++ virtual ~CSecurityTLS(); ++ virtual statusEnum processMsg(CConnection* cc); ++ virtual int getType() const { return secTypeTLS; }; ++ virtual const char* description() const { return "TLS Encryption"; } ++ ++ private: ++ static void initGlobal(); ++ ++ gnutls_session session; ++ gnutls_anon_server_credentials anon_cred; ++ }; ++} ++ ++#endif /* HAVE_GNUTLS */ ++ ++#endif /* __C_SECURITY_TLS_H__ */ +--- vnc-4.0b5-unixsrc/rfb/CSecurityNone.h.tls 2004-06-11 16:36:08.312280073 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CSecurityNone.h 2004-06-11 16:36:46.871917352 +0100 +@@ -28,8 +28,8 @@ + + class CSecurityNone : public CSecurity { + public: +- virtual bool processMsg(CConnection* cc, bool* done) { +- *done = true; return true; ++ virtual statusEnum processMsg(CConnection* cc) { ++ return RFB_SECURITY_COMPLETED; + } + virtual int getType() const {return secTypeNone;} + virtual const char* description() const {return "No Encryption";} +--- vnc-4.0b5-unixsrc/rfb/CConnection.cxx.tls 2004-06-11 16:36:08.315279656 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CConnection.cxx 2004-06-11 16:36:46.980902194 +0100 +@@ -33,7 +33,8 @@ + + CConnection::CConnection() + : is(0), os(0), reader_(0), writer_(0), +- shared(false), security(0), nSecTypes(0), clientSecTypeOrder(false), ++ shared(false), security(0), ++ nSecTypes(0), nAuthTypes(0), clientSecTypeOrder(false), + state_(RFBSTATE_UNINITIALISED), useProtocol3_3(false) + { + } +@@ -64,11 +65,19 @@ + + void CConnection::addSecType(rdr::U8 secType) + { ++ vlog.debug("adding %d", secType); + if (nSecTypes == maxSecTypes) + throw Exception("too many security types"); + secTypes[nSecTypes++] = secType; + } + ++void CConnection::addAuthType(rdr::U8 authType) ++{ ++ if (nAuthTypes == maxAuthTypes) ++ throw Exception("too many authentication types"); ++ authTypes[nAuthTypes++] = authType; ++} ++ + void CConnection::setClientSecTypeOrder(bool clientOrder) { + clientSecTypeOrder = clientOrder; + } +@@ -204,15 +213,72 @@ + processSecurityMsg(); + } + ++void CConnection::processAuthTypesMsg() ++{ ++ vlog.debug("processing authentication types message"); ++ ++ int authType = secTypeInvalid; ++ ++ int nServerAuthTypes = is->readU8(); ++ if (nServerAuthTypes == 0) ++ throwConnFailedException(); ++ ++ int authTypePos = nAuthTypes; ++ for (int i = 0; i < nServerAuthTypes; i++) { ++ rdr::U8 serverAuthType = is->readU8(); ++ vlog.debug("Server offers security type %s(%d)", ++ secTypeName(serverAuthType),serverAuthType); ++ ++ // If we haven't already chosen a authType, try this one ++ // If we are using the client's preference for types, ++ // we keep trying types, to find the one that matches and ++ // which appears first in the client's list of supported types. ++ if (authType == secTypeInvalid || clientSecTypeOrder) { ++ for (int j = 0; j < nAuthTypes; j++) { ++ if (authTypes[j] == serverAuthType && j < authTypePos) { ++ authType = authTypes[j]; ++ authTypePos = j; ++ break; ++ } ++ } ++ // NB: Continue reading the remaining server authTypes, but ignore them ++ } ++ } ++ ++ // Inform the server of our decision ++ if (authType != secTypeInvalid) { ++ os->writeU8(authType); ++ os->flush(); ++ vlog.debug("Choosing authentication type %s(%d)",secTypeName(authType),authType); ++ } ++ ++ if (authType == secTypeInvalid) { ++ state_ = RFBSTATE_INVALID; ++ vlog.error("No matching authentication types"); ++ throw Exception("No matching authentication types"); ++ } ++ ++ security = getCSecurity(authType); ++ processSecurityMsg(); ++} ++ + void CConnection::processSecurityMsg() + { + vlog.debug("processing security message"); +- bool done; +- if (!security->processMsg(this, &done)) ++ switch (security->processMsg(this)) { ++ case CSecurity::RFB_SECURITY_ERROR: + throwAuthFailureException(); +- if (done) { ++ case CSecurity::RFB_SECURITY_COMPLETED: + state_ = RFBSTATE_SECURITY_RESULT; + processSecurityResultMsg(); ++ break; ++ case CSecurity::RFB_SECURITY_DEFER: ++ break; ++ case CSecurity::RFB_SECURITY_AUTH_TYPES: ++ processAuthTypesMsg(); ++ break; ++ default: ++ throw Exception("CConnection::processSecurityMsg: invalid security status"); + } + } + +--- vnc-4.0b5-unixsrc/rfb/CSecurityVncAuth.h.tls 2004-06-11 16:36:08.317279378 +0100 ++++ vnc-4.0b5-unixsrc/rfb/CSecurityVncAuth.h 2004-06-11 16:36:46.980902194 +0100 +@@ -30,7 +30,7 @@ + public: + CSecurityVncAuth(UserPasswdGetter* pg); + virtual ~CSecurityVncAuth(); +- virtual bool processMsg(CConnection* cc, bool* done); ++ virtual statusEnum processMsg(CConnection* cc); + virtual int getType() const {return secTypeVncAuth;}; + virtual const char* description() const {return "No Encryption";} + private: +--- vnc-4.0b5-unixsrc/network/Makefile.in.tls 2004-06-11 16:36:08.319279100 +0100 ++++ vnc-4.0b5-unixsrc/network/Makefile.in 2004-06-11 16:36:46.981902055 +0100 +@@ -3,7 +3,7 @@ + + OBJS = $(SRCS:.cxx=.o) + +-DIR_CPPFLAGS = -I$(top_srcdir) @SOCKLEN_T_DEFINE@ ++DIR_CPPFLAGS = -I$(top_srcdir) @SOCKLEN_T_DEFINE@ @LIBGNUTLS_CFLAGS@ + + library = libnetwork.a + +@@ -14,4 +14,5 @@ + $(AR) $(library) $(OBJS) + $(RANLIB) $(library) + ++DIR_CXXFLAGS = -DPIC -fPIC + # followed by boilerplate.mk +--- vnc-4.0b5-unixsrc/vncconfig/Makefile.in.tls 2004-06-11 16:36:08.322278683 +0100 ++++ vnc-4.0b5-unixsrc/vncconfig/Makefile.in 2004-06-11 16:36:47.034894685 +0100 +@@ -8,9 +8,9 @@ + DEP_LIBS = ../tx/libtx.a ../rfb/librfb.a ../network/libnetwork.a \ + ../rdr/librdr.a + +-EXTRA_LIBS = @X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@ ++EXTRA_LIBS = @X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@ @LIBGNUTLS_LIBS@ + +-DIR_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tx @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS ++DIR_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tx @X_CFLAGS@ @LIBGNUTLS_CFLAGS@ # X_CFLAGS are really CPPFLAGS + + all:: $(program) + +--- vnc-4.0b5-unixsrc/rdr/FdInStream.h.tls 2004-06-11 16:36:08.324278405 +0100 ++++ vnc-4.0b5-unixsrc/rdr/FdInStream.h 2004-06-11 16:36:47.035894546 +0100 +@@ -25,6 +25,10 @@ + + #include + ++#ifdef HAVE_GNUTLS ++#include ++#endif ++ + namespace rdr { + + class FdInStreamBlockCallback { +@@ -47,6 +51,10 @@ + int pos(); + void readBytes(void* data, int length); + ++#ifdef HAVE_GNUTLS ++ void useTLS(gnutls_session session); ++#endif ++ + void startTiming(); + void stopTiming(); + unsigned int kbitsPerSecond(); +@@ -63,6 +71,10 @@ + int timeoutms; + FdInStreamBlockCallback* blockCallback; + ++#ifdef HAVE_GNUTLS ++ gnutls_session tlsSession; ++#endif ++ + bool timing; + unsigned int timeWaitedIn100us; + unsigned int timedKbits; +--- vnc-4.0b5-unixsrc/rdr/FdOutStream.cxx.tls 2004-06-11 16:36:08.327277987 +0100 ++++ vnc-4.0b5-unixsrc/rdr/FdOutStream.cxx 2004-06-11 16:36:47.035894546 +0100 +@@ -45,6 +45,9 @@ + FdOutStream::FdOutStream(int fd_, int timeoutms_, int bufSize_) + : fd(fd_), timeoutms(timeoutms_), + bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0) ++#ifdef HAVE_GNUTLS ++ ,tlsSession(0) ++#endif + { + ptr = start = new U8[bufSize]; + end = start + bufSize; +@@ -113,6 +116,13 @@ + return nItems; + } + ++#ifdef HAVE_GNUTLS ++void FdOutStream::useTLS(gnutls_session session) ++{ ++ tlsSession = session; ++} ++#endif ++ + // + // writeWithTimeout() writes up to the given length in bytes from the given + // buffer to the file descriptor. If there is a timeout set and that timeout +@@ -127,7 +137,9 @@ + { + int n; + ++#ifndef HAVE_GNUTLS + do { ++#endif + + do { + fd_set fds; +@@ -159,15 +171,32 @@ + + if (n == 0) throw TimedOut(); + +- do { +- n = ::write(fd, data, length); +- } while (n < 0 && (errno == EINTR)); ++#ifdef HAVE_GNUTLS ++ if (!tlsSession) { ++#endif ++ ++ do { ++ n = ::write(fd, data, length); ++ } while (n < 0 && (errno == EINTR)); ++ ++#ifdef HAVE_GNUTLS ++ } else { ++ ++ do { ++ n = gnutls_record_send(tlsSession, data, length); ++ } while (n == GNUTLS_E_INTERRUPTED); ++ ++ if (n < 0) throw TLSException("send",n); ++ } ++#else + + // NB: This outer loop simply fixes a broken Winsock2 EWOULDBLOCK + // condition, found only under Win98 (first edition), with slow + // network connections. Should in fact never ever happen... + } while (n < 0 && (errno == EWOULDBLOCK)); + ++#endif /* HAVE_GNUTLS */ ++ + if (n < 0) throw SystemException("write",errno); + + return n; +--- vnc-4.0b5-unixsrc/rdr/FdOutStream.h.tls 2004-06-11 16:36:08.329277709 +0100 ++++ vnc-4.0b5-unixsrc/rdr/FdOutStream.h 2004-06-11 16:36:47.088887176 +0100 +@@ -25,6 +25,10 @@ + + #include + ++#ifdef HAVE_GNUTLS ++#include ++#endif ++ + namespace rdr { + + class FdOutStream : public OutStream { +@@ -41,6 +45,10 @@ + int length(); + void writeBytes(const void* data, int length); + ++#ifdef HAVE_GNUTLS ++ void useTLS(gnutls_session session); ++#endif ++ + private: + int overrun(int itemSize, int nItems); + int writeWithTimeout(const void* data, int length); +@@ -49,6 +57,10 @@ + int bufSize; + int offset; + U8* start; ++ ++#ifdef HAVE_GNUTLS ++ gnutls_session tlsSession; ++#endif + }; + + } +--- vnc-4.0b5-unixsrc/rdr/Makefile.in.tls 2004-06-11 16:36:08.331277431 +0100 ++++ vnc-4.0b5-unixsrc/rdr/Makefile.in 2004-06-11 16:36:47.089887037 +0100 +@@ -5,7 +5,7 @@ + + OBJS = $(SRCS:.cxx=.o) + +-DIR_CPPFLAGS = -I$(top_srcdir) @ZLIB_INCLUDE@ ++DIR_CPPFLAGS = -I$(top_srcdir) @ZLIB_INCLUDE@ @LIBGNUTLS_CFLAGS@ + + library = librdr.a + +--- vnc-4.0b5-unixsrc/rdr/Exception.cxx.tls 2004-06-11 16:36:08.333277153 +0100 ++++ vnc-4.0b5-unixsrc/rdr/Exception.cxx 2004-06-11 16:36:47.089887037 +0100 +@@ -62,3 +62,17 @@ + strncat(str_, buf, len-1-strlen(str_)); + strncat(str_, ")", len-1-strlen(str_)); + } ++ ++#ifdef HAVE_GNUTLS ++TLSException::TLSException(const char* s, int err_) ++ : Exception(s, "rdr::TLSException"), err(err_) ++{ ++ strncat(str_, ": ", len-1-strlen(str_)); ++ strncat(str_, gnutls_strerror(err), len-1-strlen(str_)); ++ strncat(str_, " (", len-1-strlen(str_)); ++ char buf[20]; ++ sprintf(buf,"%d",err); ++ strncat(str_, buf, len-1-strlen(str_)); ++ strncat(str_, ")", len-1-strlen(str_)); ++} ++#endif /* HAVE_GNUTLS */ +--- vnc-4.0b5-unixsrc/rdr/FdInStream.cxx.tls 2004-06-11 16:36:08.335276875 +0100 ++++ vnc-4.0b5-unixsrc/rdr/FdInStream.cxx 2004-06-11 16:36:47.142879667 +0100 +@@ -53,6 +53,9 @@ + bool closeWhenDone_) + : fd(fd_), closeWhenDone(closeWhenDone_), + timeoutms(timeoutms_), blockCallback(0), ++#ifdef HAVE_GNUTLS ++ tlsSession(0), ++#endif + timing(false), timeWaitedIn100us(5), timedKbits(0), + bufSize(bufSize_ ? bufSize_ : DEFAULT_BUF_SIZE), offset(0) + { +@@ -169,6 +172,13 @@ + } + #endif + ++#ifdef HAVE_GNUTLS ++void FdInStream::useTLS(gnutls_session session) ++{ ++ tlsSession = session; ++} ++#endif ++ + // + // readWithTimeoutOrCallback() reads up to the given length in bytes from the + // file descriptor into a buffer. If the wait argument is false, then zero is +@@ -217,12 +227,29 @@ + blockCallback->blockCallback(); + } + +- do { +- n = ::read(fd, buf, len); +- } while (n < 0 && errno == EINTR); ++#ifdef HAVE_GNUTLS ++ if (!tlsSession) { ++#endif ++ ++ do { ++ n = ::read(fd, buf, len); ++ } while (n < 0 && errno == EINTR); + +- if (n < 0) throw SystemException("read",errno); +- if (n == 0) throw EndOfStream(); ++ if (n < 0) throw SystemException("read",errno); ++ if (n == 0) throw EndOfStream(); ++ ++#ifdef HAVE_GNUTLS ++ } else { ++ ++ do { ++ n = gnutls_record_recv(tlsSession, buf, len); ++ } while (n == GNUTLS_E_INTERRUPTED); ++ ++ if (n < 0) throw TLSException("recv",n); ++ if (n == 0) throw EndOfStream(); ++ ++ } ++#endif + + if (timing) { + gettimeofday(&after, 0); +--- vnc-4.0b5-unixsrc/rdr/Exception.h.tls 2004-06-11 16:36:08.337276597 +0100 ++++ vnc-4.0b5-unixsrc/rdr/Exception.h 2004-06-11 16:36:47.143879528 +0100 +@@ -22,6 +22,10 @@ + #include + #include + ++#ifdef HAVE_GNUTLS ++#include ++#endif ++ + namespace rdr { + + struct Exception { +@@ -44,7 +48,7 @@ + struct SystemException : public Exception { + int err; + SystemException(const char* s, int err_); +- }; ++ }; + + struct TimedOut : public Exception { + TimedOut(const char* s="Timed out") : Exception(s,"rdr::TimedOut") {} +@@ -54,6 +58,13 @@ + EndOfStream(const char* s="End of stream") + : Exception(s,"rdr::EndOfStream") {} + }; ++ ++#ifdef HAVE_GNUTLS ++ struct TLSException : public Exception { ++ int err; ++ TLSException(const char* s, int err_); ++ }; ++#endif + } + + #endif +--- vnc-4.0b5-unixsrc/vncviewer/Makefile.in.tls 2004-06-11 16:36:08.339276319 +0100 ++++ vnc-4.0b5-unixsrc/vncviewer/Makefile.in 2004-06-11 16:36:47.144879388 +0100 +@@ -8,9 +8,9 @@ + DEP_LIBS = ../tx/libtx.a ../rfb/librfb.a ../network/libnetwork.a \ + ../rdr/librdr.a + +-EXTRA_LIBS = @ZLIB_LIB@ @X_PRE_LIBS@ @X_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@ ++EXTRA_LIBS = @ZLIB_LIB@ @X_PRE_LIBS@ @X_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@ @LIBGNUTLS_LIBS@ + +-DIR_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tx @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS ++DIR_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tx @X_CFLAGS@ @LIBGNUTLS_CFLAGS@ # X_CFLAGS are really CPPFLAGS + + all:: $(program) + +--- vnc-4.0b5-unixsrc/vncviewer/CConn.cxx.tls 2004-06-11 16:36:08.341276041 +0100 ++++ vnc-4.0b5-unixsrc/vncviewer/CConn.cxx 2004-06-11 16:36:47.201871462 +0100 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -64,8 +65,16 @@ + menuKeysym = XStringToKeysym(menuKeyStr.buf); + + setShared(shared); ++ ++#ifdef HAVE_GNUTLS ++ addSecType(secTypeTLS); ++#endif + addSecType(secTypeNone); + addSecType(secTypeVncAuth); ++ ++ addAuthType(secTypeNone); ++ addAuthType(secTypeVncAuth); ++ + CharArray encStr(preferredEncoding.getData()); + int encNum = encodingNum(encStr.buf); + if (encNum != -1) { +@@ -216,6 +225,10 @@ + return new CSecurityNone(); + case secTypeVncAuth: + return new CSecurityVncAuth(this); ++#ifdef HAVE_GNUTLS ++ case secTypeTLS: ++ return new CSecurityTLS(); ++#endif + default: + throw rfb::Exception("Unsupported secType?"); + } +--- vnc-4.0b5-unixsrc/tx/Makefile.in.tls 2004-06-11 16:36:08.392268949 +0100 ++++ vnc-4.0b5-unixsrc/tx/Makefile.in 2004-06-11 16:36:47.202871323 +0100 +@@ -4,7 +4,7 @@ + + OBJS = $(SRCS:.cxx=.o) + +-DIR_CPPFLAGS = -I$(top_srcdir) @X_CFLAGS@ # X_CFLAGS are really CPPFLAGS ++DIR_CPPFLAGS = -I$(top_srcdir) @X_CFLAGS@ @LIBGNUTLS_CFLAGS@ # X_CFLAGS are really CPPFLAGS + + library = libtx.a + --- vnc4-4.1.1+xorg1.0.2.orig/debian/vnc4-common.install +++ vnc4-4.1.1+xorg1.0.2/debian/vnc4-common.install @@ -0,0 +1,2 @@ +debian/tmp/usr/bin/vnc4passwd usr/bin +debian/tmp/usr/share/man/man1/vnc4passwd.1 usr/share/man/man1 --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncinstall +++ vnc4-4.1.1+xorg1.0.2/unix/vncinstall @@ -56,7 +56,7 @@ fi fi -for f in xc/programs/Xserver/Xvnc vncviewer/vncviewer vncpasswd/vncpasswd \ +for f in xorg-server-*/hw/vnc/Xvnc vncviewer/vncviewer vncpasswd/vncpasswd \ vncconfig/vncconfig vncserver x0vncserver/x0vncserver; do if [ ! -f $f ]; then echo "Couldn't find $f" @@ -85,8 +85,8 @@ done -vncModule=xc/programs/Xserver/vnc/module/vnc.so -if [ -f "$vncModule" -a -d "$moduledst" ]; then +vncModule=xorg-server-*/hw/vnc/.libs/libvnc.so +if [ -f $vncModule -a -d "$moduledst" ]; then if cmp -s $vncModule $moduledst/`basename $vncModule`; then echo "`basename $vncModule` hasn't changed" else --- vnc4-4.1.1+xorg1.0.2.orig/unix/config.cache +++ vnc4-4.1.1+xorg1.0.2/unix/config.cache @@ -0,0 +1,35 @@ +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +ac_cv_func_connect=${ac_cv_func_connect=yes} +ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname=yes} +ac_cv_func_remove=${ac_cv_func_remove=yes} +ac_cv_func_shmat=${ac_cv_func_shmat=yes} +ac_cv_have_x=${ac_cv_have_x='have_x=yes ac_x_includes= ac_x_libraries=/usr/X11R6/lib'} +ac_cv_lib_ICE_IceConnectionNumber=${ac_cv_lib_ICE_IceConnectionNumber=yes} +ac_cv_lib_dnet_dnet_ntoa=${ac_cv_lib_dnet_dnet_ntoa=no} +ac_cv_lib_dnet_stub_dnet_ntoa=${ac_cv_lib_dnet_stub_dnet_ntoa=no} +ac_cv_prog_CC=${ac_cv_prog_CC=gcc} +ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} +ac_cv_prog_CXXCPP=${ac_cv_prog_CXXCPP='c++ -E'} +ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} +ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no} +ac_cv_prog_cc_g=${ac_cv_prog_cc_g=no} +ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes} +ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} +ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=no} +ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works=yes} +ac_cv_prog_gcc=${ac_cv_prog_gcc=yes} +ac_cv_prog_gxx=${ac_cv_prog_gxx=yes} +ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} --- vnc4-4.1.1+xorg1.0.2.orig/unix/tx/TXWindow.h +++ vnc4-4.1.1+xorg1.0.2/unix/tx/TXWindow.h @@ -183,6 +183,9 @@ Display* const dpy; + TXEventHandler* eventHandler; + long eventMask; + int xPad, yPad, bevel; private: @@ -195,9 +198,7 @@ TXWindow* parent; Window win_; int width_, height_; - TXEventHandler* eventHandler; TXDeleteWindowCallback* dwc; - long eventMask; XSizeHints sizeHints; std::map selectionOwnTime; std::map selectionOwner_; --- vnc4-4.1.1+xorg1.0.2.orig/unix/tx/Makefile +++ vnc4-4.1.1+xorg1.0.2/unix/tx/Makefile @@ -0,0 +1,55 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. +COMMON = ../../common +TOP = .. + +SRCS = TXWindow.cxx TXScrollbar.cxx TXViewport.cxx TXImage.cxx TXMenu.cxx + +OBJS = $(SRCS:.cxx=.o) + +DIR_CPPFLAGS = -I$(COMMON) # X_CFLAGS are really CPPFLAGS + +library = libtx.a + +all:: $(library) + +$(library): $(OBJS) + rm -f $(library) + $(AR) $(library) $(OBJS) + $(RANLIB) $(library) + +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/unix/tx/TXViewport.cxx +++ vnc4-4.1.1+xorg1.0.2/unix/tx/TXViewport.cxx @@ -43,6 +43,21 @@ delete vScrollbar; } +void TXViewport::reparent(long embed_window) +{ + XReparentWindow(dpy, win(), (Window)embed_window, 0, 0); + XSelectInput(dpy, embed_window, child->eventMask); + if (!eventHandler) + this->setEventHandler(this); +} + +void TXViewport::handleEvent(TXWindow* w, XEvent* ev) +{ + if (child && child->eventHandler) + ((TXEventHandler *)child->eventHandler)->handleEvent(child, ev); +} + + void TXViewport::setChild(TXWindow* child_) { child = child_; --- vnc4-4.1.1+xorg1.0.2.orig/unix/tx/TXViewport.h +++ vnc4-4.1.1+xorg1.0.2/unix/tx/TXViewport.h @@ -32,8 +32,8 @@ #include "TXWindow.h" #include "TXScrollbar.h" -class TXViewport : public TXWindow, public TXScrollbarCallback, - public rfb::Timer::Callback { +class TXViewport : public TXWindow, public TXScrollbarCallback, + public TXEventHandler, public rfb::Timer::Callback { public: TXViewport(Display* dpy_, int width, int height, TXWindow* parent_=0); virtual ~TXViewport(); @@ -59,6 +59,12 @@ // normally. bool bumpScrollEvent(XMotionEvent* ev); + // reparent the viewport into a new window + void reparent(long embed_window); + + // event handler + void handleEvent(TXWindow* w, XEvent* ev); + private: virtual void resizeNotify(); virtual void scrollbarPos(int x, int y, TXScrollbar* sb); --- vnc4-4.1.1+xorg1.0.2.orig/unix/Makefile +++ vnc4-4.1.1+xorg1.0.2/unix/Makefile @@ -0,0 +1,42 @@ +# Generated automatically from common.mk:Makefile.in:boilerplate.mk by configure. +COMMON = ./../common +TOP = . + +SUBDIRS = ../common tx vncviewer vncconfig vncpasswd x0vncserver + +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = . + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/unix/config.log +++ vnc4-4.1.1+xorg1.0.2/unix/config.log @@ -0,0 +1,70 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +configure:543: checking for gcc +configure:656: checking whether the C compiler (gcc -Wall -g -O2 ) works +configure:672: gcc -o conftest -Wall -g -O2 conftest.c 1>&5 +configure:669: warning: return type defaults to 'int' +configure:698: checking whether the C compiler (gcc -Wall -g -O2 ) is a cross-compiler +configure:703: checking whether we are using GNU C +configure:712: gcc -E conftest.c +configure:731: checking whether gcc accepts -g +configure:767: checking for c++ +configure:799: checking whether the C++ compiler (c++ ) works +configure:815: c++ -o conftest conftest.C 1>&5 +configure:841: checking whether the C++ compiler (c++ ) is a cross-compiler +configure:846: checking whether we are using GNU C++ +configure:855: c++ -E conftest.C +configure:874: checking whether c++ accepts -g +configure:908: checking for ranlib +configure:936: checking whether make sets ${MAKE} +configure:1000: checking how to run the C++ preprocessor +configure:1018: c++ -E conftest.C >/dev/null 2>conftest.out +configure:1047: checking for X +configure:1114: c++ -E conftest.C >/dev/null 2>conftest.out +configure:1361: checking for dnet_ntoa in -ldnet +configure:1383: c++ -o conftest -O2 -Wall conftest.C -ldnet 1>&5 +/usr/bin/ld: cannot find -ldnet +collect2: ld returned 1 exit status +configure: failed program was: +#line 1369 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa(); + +int main() { +dnet_ntoa() +; return 0; } +configure:1405: checking for dnet_ntoa in -ldnet_stub +configure:1427: c++ -o conftest -O2 -Wall conftest.C -ldnet_stub 1>&5 +/usr/bin/ld: cannot find -ldnet_stub +collect2: ld returned 1 exit status +configure: failed program was: +#line 1413 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa(); + +int main() { +dnet_ntoa() +; return 0; } +configure:1456: checking for gethostbyname +configure:1487: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1560: checking for connect +configure:1591: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1658: checking for remove +configure:1689: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1756: checking for shmat +configure:1787: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1863: checking for IceConnectionNumber in -lICE +configure:1885: c++ -o conftest -O2 -Wall -L/usr/X11R6/lib conftest.C -lICE 1>&5 --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncviewer/CConn.cxx +++ vnc4-4.1.1+xorg1.0.2/unix/vncviewer/CConn.cxx @@ -586,10 +586,18 @@ void CConn::reconfigureViewport() { + const char * par = embedParent.getValueStr(); viewport->setMaxSize(cp.width, cp.height); if (fullScreen) { viewport->resize(DisplayWidth(dpy,DefaultScreen(dpy)), DisplayHeight(dpy,DefaultScreen(dpy))); + } else if (strlen(par) != 0) { + XWindowAttributes win_attr; + Window w = strtol(par, (char **)NULL, 0); + + XGetWindowAttributes(dpy, w, &win_attr); + viewport->reparent(w); + viewport->resize(win_attr.width, win_attr.height); } else { int w = cp.width; int h = cp.height; --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncviewer/vncviewer.cxx +++ vnc4-4.1.1+xorg1.0.2/unix/vncviewer/vncviewer.cxx @@ -41,6 +41,7 @@ using namespace network; using namespace rfb; +using namespace std; IntParameter pointerEventInterval("PointerEventInterval", "Time in milliseconds to rate-limit" @@ -95,6 +96,12 @@ StringParameter geometry("geometry", "X geometry specification", ""); StringParameter displayname("display", "The X display", ""); +/* Support for tunnelling */ +StringParameter via("via", "Gateway to tunnel via", ""); + +/* Support for reparenting */ +StringParameter embedParent("Parent", "X Window to use as a parent", ""); + char aboutText[256]; char* programName; extern char buildtime[]; @@ -157,6 +164,61 @@ exit(1); } +/* Tunnelling support. */ +static void +interpretViaParam (char **gatewayHost, char **remoteHost, + int *remotePort, char **vncServerName, + int localPort) +{ + const int SERVER_PORT_OFFSET = 5900; + char *pos = strchr (*vncServerName, ':'); + if (pos == NULL) + *remotePort = SERVER_PORT_OFFSET; + else { + int portOffset = SERVER_PORT_OFFSET; + size_t len; + *pos++ = '\0'; + len = strlen (pos); + if (*pos == ':') { + /* Two colons is an absolute port number, not an offset. */ + pos++; + len--; + portOffset = 0; + } + if (!len || strspn (pos, "-0123456789") != len ) + usage (); + *remotePort = atoi (pos) + portOffset; + } + + if (**vncServerName != '\0') + *remoteHost = *vncServerName; + + *gatewayHost = strDup (via.getValueStr ()); + *vncServerName = new char[50]; + sprintf (*vncServerName, "localhost::%d", localPort); +} + +static void +createTunnel (const char *gatewayHost, const char *remoteHost, + int remotePort, int localPort) +{ + char *cmd = getenv ("VNC_VIA_CMD"); + char *percent; + char lport[10], rport[10]; + sprintf (lport, "%d", localPort); + sprintf (rport, "%d", remotePort); + setenv ("G", gatewayHost, 1); + setenv ("H", remoteHost, 1); + setenv ("R", rport, 1); + setenv ("L", lport, 1); + if (!cmd) + cmd = "/usr/bin/ssh -f -L \"$L\":\"$H\":\"$R\" \"$G\" sleep 20"; + /* Compatibility with TightVNC's method. */ + while ((percent = strchr (cmd, '%')) != NULL) + *percent = '$'; + system (cmd); +} + int main(int argc, char** argv) { sprintf(aboutText, "VNC Viewer Free Edition 4.1.1 for X - built %s\n" @@ -190,8 +252,6 @@ usage(); } - if (vncServerName) - usage(); vncServerName = argv[i]; } @@ -207,6 +267,19 @@ vlog.error("Could not create .vnc directory: environment variable $HOME not set."); try { + /* Tunnelling support. */ + if (strlen (via.getValueStr ()) > 0) { + char *gatewayHost = ""; + char *remoteHost = "localhost"; + int localPort = findFreeTcpPort (); + int remotePort; + if (!vncServerName) + usage(); + interpretViaParam (&gatewayHost, &remoteHost, &remotePort, + &vncServerName, localPort); + createTunnel (gatewayHost, remoteHost, remotePort, localPort); + } + Socket* sock = 0; if (listenMode) { --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncviewer/parameters.h +++ vnc4-4.1.1+xorg1.0.2/unix/vncviewer/parameters.h @@ -37,6 +37,7 @@ extern rfb::BoolParameter sendPrimary; extern rfb::BoolParameter fullScreen; extern rfb::StringParameter geometry; +extern rfb::StringParameter embedParent; extern char aboutText[]; extern char* programName; --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncviewer/vncviewer.man +++ vnc4-4.1.1+xorg1.0.2/unix/vncviewer/vncviewer.man @@ -174,6 +174,23 @@ specified as an X11 keysym name (these can be obtained by removing the XK_ prefix from the entries in "/usr/include/X11/keysymdef.h"). Default is F8. +.TP +\fB\-via\fR \fIgateway\fR +Automatically create encrypted TCP tunnel to the \fIgateway\fR machine +before connection, connect to the \fIhost\fR through that tunnel +(TightVNC\-specific). By default, this option invokes SSH local port +forwarding, assuming that SSH client binary can be accessed as +/usr/bin/ssh. Note that when using the \fB\-via\fR option, the host +machine name should be specified as known to the gateway machine, e.g. +"localhost" denotes the \fIgateway\fR, not the machine where vncviewer +was launched. The environment variable \fIVNC_VIA_CMD\fR can override +the default tunnel command of +\fB/usr/bin/ssh\ -f\ -L\ "$L":"$H":"$R"\ "$G"\ sleep\ 20\fR. The tunnel +command is executed with the environment variables \fIL\fR, \fIH\fR, +\fIR\fR, and \fIG\fR taken the values of the local port number, the remote +host, the port number on the remote host, and the gateway machine +respectively. + .SH SEE ALSO .BR Xvnc (1), .BR vncpasswd (1), --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncviewer/Makefile +++ vnc4-4.1.1+xorg1.0.2/unix/vncviewer/Makefile @@ -0,0 +1,63 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. +COMMON = ../../common +TOP = .. + +SRCS = DesktopWindow.cxx CConn.cxx vncviewer.cxx + +OBJS = $(SRCS:.cxx=.o) + +program = vncviewer + +DEP_LIBS = $(TOP)/tx/libtx.a \ + $(COMMON)/rfb/librfb.a \ + $(COMMON)/network/libnetwork.a \ + $(COMMON)/rdr/librdr.a + +EXTRA_LIBS = -lz -lSM -lICE -L/usr/X11R6/lib -lXext -lX11 + +DIR_CPPFLAGS = -I$(COMMON) -I$(TOP) -I$(TOP)/tx # X_CFLAGS are really CPPFLAGS + +all:: $(program) + +$(program): $(OBJS) buildtime.o $(DEP_LIBS) + rm -f $(program) + $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) buildtime.o $(DEP_LIBS) $(LIBS) $(EXTRA_LIBS) + +buildtime.o: $(OBJS) $(DEP_LIBS) + +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncpasswd/Makefile +++ vnc4-4.1.1+xorg1.0.2/unix/vncpasswd/Makefile @@ -0,0 +1,56 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. +COMMON = ../../common +TOP = .. + +SRCS = vncpasswd.cxx + +OBJS = vncpasswd.o + +program = vncpasswd + +DEP_LIBS = $(COMMON)/rfb/librfb.a + +DIR_CPPFLAGS = -I$(COMMON) + +all:: $(program) + +$(program): $(OBJS) $(DEP_LIBS) + rm -f $(program) + $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(DEP_LIBS) $(LIBS) + +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/unix/boilerplate.mk +++ vnc4-4.1.1+xorg1.0.2/unix/boilerplate.mk @@ -15,7 +15,7 @@ CFLAGS = @CFLAGS@ $(DIR_CFLAGS) CCLD = $(CC) CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ +CXXFLAGS = @CXXFLAGS@ $(DIR_CXXFLAGS) CXXLD = $(CXX) CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncserver.man +++ vnc4-4.1.1+xorg1.0.2/unix/vncserver.man @@ -77,6 +77,11 @@ must be 8 bits deep. .TP +.B \-nohttpd +Do not instruct Xvnc to run a mini-httpd if the VNC Java applet is +found. + +.TP .B \-kill :\fIdisplay#\fP This kills a VNC desktop previously started with vncserver. It does this by killing the Xvnc process, whose process ID is stored in the file --- vnc4-4.1.1+xorg1.0.2.orig/unix/x0vncserver/Makefile +++ vnc4-4.1.1+xorg1.0.2/unix/x0vncserver/Makefile @@ -0,0 +1,63 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. +COMMON = ../../common +TOP = .. + +SRCS = Image.cxx x0vncserver.cxx ../vncconfig/QueryConnectDialog.cxx + +OBJS = $(SRCS:.cxx=.o) + +program = x0vncserver + +DEP_LIBS = $(COMMON)/rfb/librfb.a \ + $(COMMON)/network/libnetwork.a \ + $(COMMON)/rdr/librdr.a \ + $(TOP)/tx/libtx.a + +EXTRA_LIBS = -lz -lSM -lICE -L/usr/X11R6/lib -lXtst -lXext -lX11 + +DIR_CPPFLAGS = -I$(COMMON) -I$(TOP) -I$(TOP)/tx -I$(TOP)/vncconfig # X_CFLAGS are really CPPFLAGS + +all:: $(program) + +$(program): $(OBJS) buildtime.o $(DEP_LIBS) + rm -f $(program) + $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) buildtime.o $(DEP_LIBS) $(LIBS) $(EXTRA_LIBS) + +buildtime.o: $(OBJS) $(DEP_LIBS) + +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/unix/x0vncserver/x0vncserver.cxx +++ vnc4-4.1.1+xorg1.0.2/unix/x0vncserver/x0vncserver.cxx @@ -302,6 +302,7 @@ fd_set rfds; std::list sockets; std::list::iterator i; + tv.tv_usec = tv.tv_sec = 0; // Process any incoming X events TXWindow::handleXEvents(dpy); --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncconfig/Makefile +++ vnc4-4.1.1+xorg1.0.2/unix/vncconfig/Makefile @@ -0,0 +1,62 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. +COMMON = ../../common +TOP = .. + +SRCS = vncExt.c vncconfig.cxx QueryConnectDialog.cxx + +OBJS = vncExt.o vncconfig.o QueryConnectDialog.o + +program = vncconfig + +DEP_LIBS = $(TOP)/tx/libtx.a $(COMMON)/rfb/librfb.a \ + $(COMMON)/network/libnetwork.a \ + $(COMMON)/rdr/librdr.a + +EXTRA_LIBS = -lSM -lICE -L/usr/X11R6/lib -lX11 -lXext + +DIR_CPPFLAGS = -I$(COMMON) -I$(TOP)/tx # X_CFLAGS are really CPPFLAGS + +all:: $(program) + +$(program): $(OBJS) buildtime.o $(DEP_LIBS) + rm -f $(program) + $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) buildtime.o $(DEP_LIBS) $(LIBS) $(EXTRA_LIBS) + +buildtime.o: $(OBJS) $(DEP_LIBS) + +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc.patch +++ vnc4-4.1.1+xorg1.0.2/unix/xc.patch @@ -2,7 +2,7 @@ --- xc/programs/Xserver/Imakefile Fri Jun 6 11:14:39 2003 *************** *** 409,412 **** ---- 409,429 ---- +--- 409,435 ---- #endif #endif /* XsunServer */ + XCOMM @@ -13,12 +13,18 @@ + CFB16DIR = cfb16 + CFB24DIR = cfb24 + CFB32DIR = cfb32 ++ FBDIR = fb + XVNCDDXDIR = vnc/Xvnc ++ #if VncUseFb ++ XVNCDIRS = $(STDDIRS) $(FBDIR) $(XVNCDDXDIR) $(DEPDIRS) ++ XVNCLIBS = PreFbLibs vnc/Xvnc/LibraryTargetName(xvnc) FbPostFbLibs ++ #else + XVNCDIRS = $(STDDIRS) $(MFBDIR) \ + $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ + $(XVNCDDXDIR) $(DEPDIRS) -+ XVNCOBJS = $(XVNCDDXDIR)/stubs.o $(XVNCDDXDIR)/miinitext.o + XVNCLIBS = PreFbLibs vnc/Xvnc/LibraryTargetName(xvnc) CFBLibs PostFbLibs ++ #endif ++ XVNCOBJS = $(XVNCDDXDIR)/stubs.o $(XVNCDDXDIR)/miinitext.o + XVNCSYSLIBS = $(FONTLIBS) $(SYSLIBS) + ServerTarget(Xvnc,$(XVNCDIRS),$(XVNCOBJS), \ + $(LIBCWRAPPER) $(XVNCLIBS) $(LOADABLEEXTS),$(XVNCSYSLIBS)) --- vnc4-4.1.1+xorg1.0.2.orig/unix/config.status +++ vnc4-4.1.1+xorg1.0.2/unix/config.status @@ -0,0 +1,163 @@ +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host salsa: +# +# ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --with-installed-zlib +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]" +for ac_option +do + case "$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running ${CONFIG_SHELL-/bin/sh} ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --with-installed-zlib --no-create --no-recursion" + exec ${CONFIG_SHELL-/bin/sh} ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --with-installed-zlib --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "./config.status generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "$ac_cs_usage"; exit 0 ;; + *) echo "$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=. + +trap 'rm -fr Makefile tx/Makefile x0vncserver/Makefile vncviewer/Makefile vncconfig/Makefile vncpasswd/Makefile xc/config/cf/vnc.def conftest*; exit 1' 1 2 15 + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; + s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF +/^[ ]*VPATH[ ]*=[^:]*$/d + +s%@SHELL@%/bin/sh%g +s%@CFLAGS@%-Wall -g -O2 -Wall%g +s%@CPPFLAGS@%%g +s%@CXXFLAGS@%-O2 -Wall%g +s%@FFLAGS@%%g +s%@DEFS@% %g +s%@LDFLAGS@%%g +s%@LIBS@%%g +s%@exec_prefix@%${prefix}%g +s%@prefix@%/usr%g +s%@program_transform_name@%s,x,x,%g +s%@bindir@%${exec_prefix}/bin%g +s%@sbindir@%${exec_prefix}/sbin%g +s%@libexecdir@%${exec_prefix}/libexec%g +s%@datadir@%${prefix}/share%g +s%@sysconfdir@%${prefix}/etc%g +s%@sharedstatedir@%${prefix}/com%g +s%@localstatedir@%${prefix}/var%g +s%@libdir@%${exec_prefix}/lib%g +s%@includedir@%${prefix}/include%g +s%@oldincludedir@%/usr/include%g +s%@infodir@%${prefix}/share/info%g +s%@mandir@%${prefix}/share/man%g +s%@CC@%gcc%g +s%@CXX@%c++%g +s%@RANLIB@%ranlib%g +s%@SET_MAKE@%%g +s%@MITSHM_CPPFLAGS@%-DMITSHM%g +s%@CXXCPP@%c++ -E%g +s%@X_CFLAGS@%%g +s%@X_PRE_LIBS@% -lSM -lICE%g +s%@X_LIBS@% -L/usr/X11R6/lib%g +s%@X_EXTRA_LIBS@%%g +s%@ZLIB_DIR@%%g +s%@ZLIB_INCLUDE@%%g +s%@ZLIB_LIB@%-lz%g +s%@USE_FB@%YES%g + +CEOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi + +CONFIG_FILES=${CONFIG_FILES-"Makefile:common.mk:Makefile.in:boilerplate.mk tx/Makefile:common.mk:tx/Makefile.in:boilerplate.mk x0vncserver/Makefile:common.mk:x0vncserver/Makefile.in:boilerplate.mk vncviewer/Makefile:common.mk:vncviewer/Makefile.in:boilerplate.mk vncconfig/Makefile:common.mk:vncconfig/Makefile.in:boilerplate.mk vncpasswd/Makefile:common.mk:vncpasswd/Makefile.in:boilerplate.mk xc/config/cf/vnc.def "} +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + + + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/unix/vncserver +++ vnc4-4.1.1+xorg1.0.2/unix/vncserver @@ -42,6 +42,10 @@ $defaultXStartup = ("#!/bin/sh\n\n". + "# Uncomment the following two lines for normal desktop:\n". + "# unset SESSION_MANAGER\n". + "# exec /etc/X11/xinit/xinitrc\n\n". + "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n". "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n". "xsetroot -solid grey\n". "vncconfig -iconic &\n". @@ -54,6 +58,7 @@ # Check command line options &ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1, + "-nohttpd",0, "-help",0,"-h",0,"--help",0); &Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'}); @@ -74,6 +79,12 @@ if ($opt{'-pixelformat'}) { $pixelformat = $opt{'-pixelformat'}; } +if ($opt{'-nohttpd'}) { + $nohttpd = 1; + } +else { + $nohttpd = 0; +} &CheckGeometryAndDepth(); @@ -116,18 +127,12 @@ $desktopLog = "$vncUserDir/$host:$displayNumber.log"; unlink($desktopLog); -# Make an X server cookie - use as the seed the sum of the current time, our -# PID and part of the encrypted form of the password. Ideally we'd use -# /dev/urandom, but that's only available on Linux. - -srand(time+$$+unpack("L",`cat $vncUserDir/passwd`)); -$cookie = ""; -for (1..16) { - $cookie .= sprintf("%02x", int(rand(256)) % 256); -} - -system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie"); -system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie"); +# Make an X server cookie - use mcookie +$cookie = `/usr/bin/mcookie`; +open (XAUTH, "|xauth -f $xauthorityFile source -"); +print XAUTH "add $host:$displayNumber . $cookie\n"; +print XAUTH "add $host/unix:$displayNumber . $cookie\n"; +close XAUTH; if ($opt{'-name'}) { $desktopName = $opt{'-name'}; @@ -139,7 +144,7 @@ $cmd = "Xvnc :$displayNumber"; $cmd .= " -desktop " . "edString($desktopName); -$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles); +$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles && ! $nohttpd); $cmd .= " -auth $xauthorityFile"; $cmd .= " -geometry $geometry" if ($geometry); $cmd .= " -depth $depth" if ($depth); @@ -148,6 +153,7 @@ $cmd .= " -rfbauth $vncUserDir/passwd"; $cmd .= " -rfbport $vncPort"; $cmd .= " -pn"; +$cmd .= " -extension XFIXES"; # Add font path and color database stuff here, e.g.: # @@ -415,7 +421,7 @@ sub Usage { - die("\nusage: $prog [:] [-name ] [-depth ]\n". + die("\nusage: $prog [:] [-nohttpd] [-name ] [-depth ]\n". " [-geometry x]\n". " [-pixelformat rgbNNN|bgrNNN]\n". " ...\n\n". --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/config/cf/vnc.def.in +++ vnc4-4.1.1+xorg1.0.2/unix/xc/config/cf/vnc.def.in @@ -0,0 +1,38 @@ +#define BuildServersOnly YES +#define BuildFonts NO +#define BuildClients NO +#define BuildDocs NO +#define BuildPexExt NO +#define BuildNls NO +#define BuildXIE NO +#define BuildGlxExt NO +#define XnestServer YES +#define XF86Server NO +#define XprtServer NO + +#ifdef SunArchitecture +#define ProjectRoot /usr/openwin +#define HasGcc2 YES +#define BuildXKB NO +#endif + +#define HasFreetype2 NO +#define BuildVNCExt YES +#define VNCExtDefines -DVNCEXT +#define SiteExtensionDefines VNCExtDefines +#define SiteExtensionDirs vnc + +#define VncUseFb @USE_FB@ + +#define VncUnixDir $(TOP)/.. +#define VncCommonDir VncUnixDir/../common +#define VncExtLibs VncCommonDir/rfb/librfb.a \ + VncCommonDir/Xregion/libXregion.a \ + VncCommonDir/network/libnetwork.a \ + VncCommonDir/rdr/librdr.a + +#define SiteExtensionLibs vnc/LibraryTargetName(vnc) VncExtLibs + +#define ServerTarget(server,subdirs,objects,libs,syslibs) @@\ +CCLINK = $(CXXENVSETUP) $(CXX) @@\ +ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(_NOOP_)) --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/config/cf/vnc.def +++ vnc4-4.1.1+xorg1.0.2/unix/xc/config/cf/vnc.def @@ -6,7 +6,8 @@ #define BuildNls NO #define BuildXIE NO #define BuildGlxExt NO -#define XnestServer NO +#define XnestServer YES +#define XF86Server NO #define XprtServer NO #ifdef SunArchitecture @@ -21,6 +22,8 @@ #define SiteExtensionDefines VNCExtDefines #define SiteExtensionDirs vnc +#define VncUseFb YES + #define VncUnixDir $(TOP)/.. #define VncCommonDir VncUnixDir/../common #define VncExtLibs VncCommonDir/rfb/librfb.a \ --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/programs/Xserver/vnc/XserverDesktop.h +++ vnc4-4.1.1+xorg1.0.2/unix/xc/programs/Xserver/vnc/XserverDesktop.h @@ -29,6 +29,8 @@ #include #include +#include "xorg-server.h" + extern "C" { #define class c_class; #include --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/programs/Xserver/vnc/vncExtInit.cc +++ vnc4-4.1.1+xorg1.0.2/unix/xc/programs/Xserver/vnc/vncExtInit.cc @@ -751,7 +751,7 @@ rep.timeout = qcTimeout; rep.addrLen = qcTimeout ? strlen(qcAddress) : 0; rep.userLen = qcTimeout ? strlen(qcUsername) : 0; - rep.opaqueId = (CARD32)queryConnectId; + rep.opaqueId = (CARD32)(long)queryConnectId; rep.length = (rep.userLen + rep.addrLen + 3) >> 2; if (client->swapped) { swaps(&rep.sequenceNumber, n); --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/programs/Xserver/vnc/Imakefile +++ vnc4-4.1.1+xorg1.0.2/unix/xc/programs/Xserver/vnc/Imakefile @@ -36,8 +36,8 @@ NormalLintTarget($(SRCS)) NormalLibraryObjectRule() -NormalCplusplusObjectRule() - +.CCsuf.Osuf: + NormalSharedLibObjCplusplusCompile($(_NOOP_)) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc +++ vnc4-4.1.1+xorg1.0.2/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc @@ -36,8 +36,6 @@ extern "C" { #define class c_class #define public c_public -#define xor c_xor -#define and c_and #ifdef WIN32 #include #endif @@ -48,8 +46,12 @@ #include "X11/Xos.h" #include "scrnintstr.h" #include "servermd.h" +#ifdef VNC_USE_FB +#include "fb.h" +#else #define PSZ 8 #include "cfb.h" +#endif #include "mi.h" #include "mibstore.h" #include "colormapst.h" @@ -68,11 +70,9 @@ #include "inputstr.h" #include "keysym.h" extern int defaultColorVisualClass; - extern char buildtime[]; #undef class #undef public -#undef xor -#undef and +#ifndef VNC_USE_FB extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int); extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int); extern Bool cfb16CreateGC(GCPtr); @@ -83,6 +83,7 @@ unsigned long, char*); extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int, unsigned long, char*); +#endif } #define XVNCVERSION "Free Edition 4.1.1" @@ -215,7 +216,7 @@ void ddxUseMsg() { - ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT); + ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT); ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE, VENDOR_STRING); ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); @@ -482,7 +483,7 @@ } #endif - +#ifndef VNC_USE_FB static Bool vfbMultiDepthCreateGC(GCPtr pGC) { switch (vfbBitsPerPixel(pGC->depth)) @@ -541,6 +542,7 @@ break; } } +#endif static ColormapPtr InstalledMaps[MAXSCREENS]; @@ -811,6 +813,11 @@ defaultColorVisualClass = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor; +#ifdef VNC_USE_FB + if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, + dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel)) + return FALSE; +#else switch (pvfb->bitsPerPixel) { case 1: @@ -838,6 +845,7 @@ pScreen->CreateGC = vfbMultiDepthCreateGC; pScreen->GetImage = vfbMultiDepthGetImage; pScreen->GetSpans = vfbMultiDepthGetSpans; +#endif pScreen->InstallColormap = vfbInstallColormap; pScreen->UninstallColormap = vfbUninstallColormap; @@ -883,6 +891,9 @@ } } +#ifdef VNC_USE_FB + ret = fbCreateDefColormap(pScreen); +#else if (pvfb->bitsPerPixel == 1) { ret = mfbCreateDefColormap(pScreen); @@ -891,6 +902,7 @@ { ret = cfbCreateDefColormap(pScreen); } +#endif miSetZeroLineBias(pScreen, pvfb->lineBias); @@ -910,7 +922,7 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char **argv) { - ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT); + ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT); ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE, VENDOR_STRING); wellKnownSocketsCreated = true; @@ -961,25 +973,6 @@ } /* end InitOutput */ -#ifdef DPMSExtension -extern "C" { -#if NeedFunctionPrototypes - void DPMSSet(CARD16 level) -#else - void DPMSSet(level) - CARD16 level; -#endif - { - return; - } - - Bool DPMSSupported() - { - return FALSE; - } -} -#endif - /* this is just to get the server to link on AIX */ #ifdef AIXV3 int SelectWaitTime = 10000; /* usec */ --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/programs/Xserver/vnc/Xvnc/Imakefile +++ vnc4-4.1.1+xorg1.0.2/unix/xc/programs/Xserver/vnc/Xvnc/Imakefile @@ -31,12 +31,19 @@ OBJS1 = os2_stubs.o #endif +#ifdef VncUseFb +FB_DEFINES = -DVNC_USE_FB + FBINCLUDE = -I../../fb +#else + FBINCLUDE = -I../../cfb +#endif + SRCSA = xvnc.cc stubs.c $(SRCS1) miinitext.c $(SRCS2) OBJSA = xvnc.o stubs.o $(OBJS1) miinitext.o $(OBJS2) -INCLUDES = -I. -I.. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ - -I../../cfb -I../../mfb -I../../mi -I../../include -I../../os \ +INCLUDES = -I. -I.. -I$(XBUILDINCDIR) -I$(FONTINCSRC) $(FB_DEFINES) \ + $(FBINCLUDE) -I../../mfb -I../../mi -I../../include -I../../os \ -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/render $(VNCINCLUDE) DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) \ @@ -48,7 +55,7 @@ * Make sure XINPUT, XF86VidTune, etc arent defined for the miinitext.o * used by Xvnc */ -EXT_DEFINES = ExtensionDefines -UXF86VIDMODE -UXFreeXDGA -UXF86MISC +EXT_DEFINES = ExtensionDefines -UXINPUT -UXF86VIDMODE -UXFreeXDGA -UXF86MISC #endif @@ -70,7 +77,7 @@ SpecialCplusplusObjectRule(xvnc,$(ICONFIGFILES) xvnc,$(EXT_DEFINES) $(NO_OPERATOR_NAMES)) LinkSourceFile(miinitext.c,$(SERVERSRC)/mi) -SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(EXT_DEFINES) $(PAN_DEFINES) -DNO_MODULE_EXTS $(EXT_MODULE_DEFINES) -UXFree86LOADER) +SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(EXT_DEFINES) $(PAN_DEFINES) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS $(EXT_MODULE_DEFINES) -UXFree86LOADER) /* InstallManPage(Xvfb,$(MANDIR)) */ DependTarget() --- vnc4-4.1.1+xorg1.0.2.orig/unix/xc/programs/Xserver/vnc/module/Imakefile +++ vnc4-4.1.1+xorg1.0.2/unix/xc/programs/Xserver/vnc/module/Imakefile @@ -21,7 +21,8 @@ LinkSourceFile(xf86vncModule.cc,..) LinkSourceFile(XserverDesktop.cc,..) -ModuleObjectRule() +.CCsuf.Osuf: + NormalSharedLibObjCplusplusCompile($(_NOOP_)) /* LibraryModuleTarget(vnc,$(OBJS) $(VNCLIBS)) InstallLibraryModule(vnc,$(MODULEDIR),extensions) --- vnc4-4.1.1+xorg1.0.2.orig/unix/configure +++ vnc4-4.1.1+xorg1.0.2/unix/configure @@ -16,6 +16,8 @@ ac_help="$ac_help --with-installed-zlib use the version of zlib which is installed on the system instead of the one distributed with VNC" +ac_help="$ac_help + --with-fb use the new 'fb' framebuffer implementation" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -537,7 +539,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:541: checking for $ac_word" >&5 +echo "configure:543: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -567,7 +569,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:571: checking for $ac_word" >&5 +echo "configure:573: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -618,7 +620,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:622: checking for $ac_word" >&5 +echo "configure:624: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -650,7 +652,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:656: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -661,12 +663,12 @@ cat > conftest.$ac_ext << EOF -#line 665 "configure" +#line 667 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -692,12 +694,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:698: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:701: checking whether we are using GNU C" >&5 +echo "configure:703: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -706,7 +708,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -725,7 +727,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:729: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:731: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -761,7 +763,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:765: checking for $ac_word" >&5 +echo "configure:767: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -793,7 +795,7 @@ echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:797: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:799: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -804,12 +806,12 @@ cat > conftest.$ac_ext << EOF -#line 808 "configure" +#line 810 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -835,12 +837,12 @@ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:839: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:841: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:844: checking whether we are using GNU C++" >&5 +echo "configure:846: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -849,7 +851,7 @@ yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -868,7 +870,7 @@ ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:872: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:874: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -899,61 +901,10 @@ fi fi -for ac_declaration in \ - ''\ - '#include ' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat > conftest.$ac_ext < -$ac_declaration -int main() { -exit (42); -; return 0; } -EOF -if { (eval echo configure:921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - continue -fi -rm -f conftest* - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - - # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:957: checking for $ac_word" >&5 +echo "configure:908: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -981,7 +932,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:985: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:936: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1045,7 +996,7 @@ fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1049: checking how to run the C++ preprocessor" >&5 +echo "configure:1000: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1058,12 +1009,12 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1092,7 +1043,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1096: checking for X" >&5 +echo "configure:1047: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1154,12 +1105,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1228,14 +1179,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1341,17 +1292,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1345: checking whether -R must be followed by a space" >&5 +echo "configure:1296: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -1367,14 +1318,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -1406,7 +1357,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1410: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1361: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1414,7 +1365,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1450,7 +1401,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1454: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1405: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1458,7 +1409,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1501,12 +1452,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1505: checking for gethostbyname" >&5 +echo "configure:1456: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1553,7 +1504,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1557: checking for gethostbyname in -lnsl" >&5 +echo "configure:1508: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1561,7 +1512,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1605,12 +1556,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1609: checking for connect" >&5 +echo "configure:1560: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1657,7 +1608,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1661: checking for connect in -lsocket" >&5 +echo "configure:1612: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1665,7 +1616,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1703,12 +1654,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1707: checking for remove" >&5 +echo "configure:1658: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -1755,7 +1706,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1759: checking for remove in -lposix" >&5 +echo "configure:1710: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1763,7 +1714,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1801,12 +1752,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1805: checking for shmat" >&5 +echo "configure:1756: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -1853,7 +1804,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:1857: checking for shmat in -lipc" >&5 +echo "configure:1808: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1861,7 +1812,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1908,7 +1859,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:1912: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:1863: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1916,7 +1867,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1975,6 +1926,22 @@ +# Check whether --with-fb or --without-fb was given. +if test "${with_fb+set}" = set; then + withval="$with_fb" + : +fi + +if test "$with_installed_zlib" = yes; then + echo "using 'fb' framebuffer" + USE_FB=YES +else + echo "using 'mfb' and 'cfb' framebuffer" + USE_FB=NO +fi + + + BOILERPLATE=boilerplate.mk if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then @@ -2101,6 +2068,7 @@ vncviewer/Makefile:common.mk:vncviewer/Makefile.in:$BOILERPLATE \ vncconfig/Makefile:common.mk:vncconfig/Makefile.in:$BOILERPLATE \ vncpasswd/Makefile:common.mk:vncpasswd/Makefile.in:$BOILERPLATE \ + xc/config/cf/vnc.def \ " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF --- vnc4-4.1.1+xorg1.0.2.orig/unix/configure.in +++ vnc4-4.1.1+xorg1.0.2/unix/configure.in @@ -65,6 +65,18 @@ AC_SUBST(ZLIB_INCLUDE) AC_SUBST(ZLIB_LIB) +AC_ARG_WITH(fb, +[ --with-fb use the new 'fb' framebuffer implementation]) +if test "$with_installed_zlib" = yes; then + echo "using 'fb' framebuffer" + USE_FB=YES +else + echo "using 'mfb' and 'cfb' framebuffer" + USE_FB=NO +fi + +AC_SUBST(USE_FB) + BOILERPLATE=boilerplate.mk if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then @@ -79,4 +91,5 @@ vncviewer/Makefile:common.mk:vncviewer/Makefile.in:$BOILERPLATE \ vncconfig/Makefile:common.mk:vncconfig/Makefile.in:$BOILERPLATE \ vncpasswd/Makefile:common.mk:vncpasswd/Makefile.in:$BOILERPLATE \ + xc/config/cf/vnc.def \ ) --- vnc4-4.1.1+xorg1.0.2.orig/common/config.cache +++ vnc4-4.1.1+xorg1.0.2/common/config.cache @@ -0,0 +1,36 @@ +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +ac_cv_func_connect=${ac_cv_func_connect=yes} +ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname=yes} +ac_cv_func_remove=${ac_cv_func_remove=yes} +ac_cv_func_shmat=${ac_cv_func_shmat=yes} +ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} +ac_cv_have_x=${ac_cv_have_x='have_x=yes ac_x_includes= ac_x_libraries=/usr/X11R6/lib'} +ac_cv_lib_ICE_IceConnectionNumber=${ac_cv_lib_ICE_IceConnectionNumber=yes} +ac_cv_lib_dnet_dnet_ntoa=${ac_cv_lib_dnet_dnet_ntoa=no} +ac_cv_lib_dnet_stub_dnet_ntoa=${ac_cv_lib_dnet_stub_dnet_ntoa=no} +ac_cv_prog_CC=${ac_cv_prog_CC=gcc} +ac_cv_prog_CXX=${ac_cv_prog_CXX=c++} +ac_cv_prog_CXXCPP=${ac_cv_prog_CXXCPP='c++ -E'} +ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} +ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no} +ac_cv_prog_cc_g=${ac_cv_prog_cc_g=no} +ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes} +ac_cv_prog_cxx_cross=${ac_cv_prog_cxx_cross=no} +ac_cv_prog_cxx_g=${ac_cv_prog_cxx_g=no} +ac_cv_prog_cxx_works=${ac_cv_prog_cxx_works=yes} +ac_cv_prog_gcc=${ac_cv_prog_gcc=yes} +ac_cv_prog_gxx=${ac_cv_prog_gxx=yes} +ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes} --- vnc4-4.1.1+xorg1.0.2.orig/common/Makefile +++ vnc4-4.1.1+xorg1.0.2/common/Makefile @@ -0,0 +1,42 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. + +SUBDIRS = rdr network Xregion rfb + +DIR_CFLAGS = -DPIC -fPIC +DIR_CXXFLAGS = -DPIC -fPIC +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = . + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/common/config.log +++ vnc4-4.1.1+xorg1.0.2/common/config.log @@ -0,0 +1,79 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +configure:537: checking for gcc +configure:650: checking whether the C compiler (gcc -Wall -g -O2 ) works +configure:666: gcc -o conftest -Wall -g -O2 conftest.c 1>&5 +configure:663: warning: return type defaults to 'int' +configure:692: checking whether the C compiler (gcc -Wall -g -O2 ) is a cross-compiler +configure:697: checking whether we are using GNU C +configure:706: gcc -E conftest.c +configure:725: checking whether gcc accepts -g +configure:761: checking for c++ +configure:793: checking whether the C++ compiler (c++ ) works +configure:809: c++ -o conftest conftest.C 1>&5 +configure:835: checking whether the C++ compiler (c++ ) is a cross-compiler +configure:840: checking whether we are using GNU C++ +configure:849: c++ -E conftest.C +configure:868: checking whether c++ accepts -g +configure:917: gcc -c -Wall -g -O2 conftest.c 1>&5 +configure:934: gcc -c -Wall -g -O2 conftest.c 1>&5 +configure: In function 'main': +configure:930: warning: implicit declaration of function 'exit' +configure:930: warning: incompatible implicit declaration of built-in function 'exit' +configure:953: checking for ranlib +configure:981: checking whether make sets ${MAKE} +configure:1045: checking how to run the C++ preprocessor +configure:1063: c++ -E conftest.C >/dev/null 2>conftest.out +configure:1092: checking for X +configure:1159: c++ -E conftest.C >/dev/null 2>conftest.out +configure:1406: checking for dnet_ntoa in -ldnet +configure:1428: c++ -o conftest -O2 -Wall conftest.C -ldnet 1>&5 +/usr/bin/ld: cannot find -ldnet +collect2: ld returned 1 exit status +configure: failed program was: +#line 1414 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa(); + +int main() { +dnet_ntoa() +; return 0; } +configure:1450: checking for dnet_ntoa in -ldnet_stub +configure:1472: c++ -o conftest -O2 -Wall conftest.C -ldnet_stub 1>&5 +/usr/bin/ld: cannot find -ldnet_stub +collect2: ld returned 1 exit status +configure: failed program was: +#line 1458 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa(); + +int main() { +dnet_ntoa() +; return 0; } +configure:1501: checking for gethostbyname +configure:1532: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1605: checking for connect +configure:1636: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1703: checking for remove +configure:1734: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1801: checking for shmat +configure:1832: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:1908: checking for IceConnectionNumber in -lICE +configure:1930: c++ -o conftest -O2 -Wall -L/usr/X11R6/lib conftest.C -lICE 1>&5 +configure:1979: checking for vsnprintf +configure:2010: c++ -o conftest -O2 -Wall conftest.C 1>&5 +configure:2033: checking for socklen_t +configure:2044: c++ -c -O2 -Wall conftest.C 1>&5 --- vnc4-4.1.1+xorg1.0.2.orig/common/boilerplate.mk +++ vnc4-4.1.1+xorg1.0.2/common/boilerplate.mk @@ -15,7 +15,7 @@ CFLAGS = @CFLAGS@ $(DIR_CFLAGS) CCLD = $(CC) CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ +CXXFLAGS = @CXXFLAGS@ $(DIR_CXXFLAGS) CXXLD = $(CXX) CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ --- vnc4-4.1.1+xorg1.0.2.orig/common/rfb/Password.h +++ vnc4-4.1.1+xorg1.0.2/common/rfb/Password.h @@ -28,6 +28,7 @@ public: PlainPasswd(); PlainPasswd(char* pwd); + PlainPasswd(int l); PlainPasswd(const ObfuscatedPasswd& obfPwd); ~PlainPasswd(); void replaceBuf(char* b); --- vnc4-4.1.1+xorg1.0.2.orig/common/rfb/Makefile +++ vnc4-4.1.1+xorg1.0.2/common/rfb/Makefile @@ -0,0 +1,106 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. + +CXXSRCS = \ + Blacklist.cxx \ + CConnection.cxx \ + CMsgHandler.cxx \ + CMsgReader.cxx \ + CMsgReaderV3.cxx \ + CMsgWriter.cxx \ + CMsgWriterV3.cxx \ + CSecurityVncAuth.cxx \ + ComparingUpdateTracker.cxx \ + Configuration.cxx \ + ConnParams.cxx \ + Cursor.cxx \ + Decoder.cxx \ + Encoder.cxx \ + HTTPServer.cxx \ + HextileDecoder.cxx \ + HextileEncoder.cxx \ + KeyRemapper.cxx \ + LogWriter.cxx \ + Logger.cxx \ + Logger_file.cxx \ + Logger_stdio.cxx \ + Password.cxx \ + PixelBuffer.cxx \ + PixelFormat.cxx \ + RREEncoder.cxx \ + RREDecoder.cxx \ + RawDecoder.cxx \ + RawEncoder.cxx \ + Region.cxx \ + SConnection.cxx \ + SMsgHandler.cxx \ + SMsgReader.cxx \ + SMsgReaderV3.cxx \ + SMsgWriter.cxx \ + SMsgWriterV3.cxx \ + ServerCore.cxx \ + SSecurityFactoryStandard.cxx \ + SSecurityVncAuth.cxx \ + Timer.cxx \ + TransImageGetter.cxx \ + UpdateTracker.cxx \ + VNCSConnectionST.cxx \ + VNCServerST.cxx \ + ZRLEEncoder.cxx \ + ZRLEDecoder.cxx \ + encodings.cxx \ + secTypes.cxx \ + util.cxx + +SRCS = d3des.c $(CXXSRCS) + +OBJS = d3des.o $(CXXSRCS:.cxx=.o) + +DIR_CPPFLAGS = -I$(top_srcdir) -DHAVE_VSNPRINTF + +library = librfb.a + +all:: $(library) + +$(library): $(OBJS) + rm -f $(library) + $(AR) $(library) $(OBJS) + $(RANLIB) $(library) + +DIR_CFLAGS = -DPIC -fPIC +DIR_CXXFLAGS = -DPIC -fPIC +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/common/rfb/SConnection.cxx +++ vnc4-4.1.1+xorg1.0.2/common/rfb/SConnection.cxx @@ -178,6 +178,16 @@ { vlog.debug("processing security type message"); int secType = is->readU8(); + + // Verify that the requested security type should be offered + std::list secTypes; + std::list::iterator i; + securityFactory->getSecTypes(&secTypes, reverseConnection); + for (i=secTypes.begin(); i!=secTypes.end(); i++) + if (*i == secType) break; + if (i == secTypes.end()) + throw Exception("Requested security type not available"); + vlog.info("Client requests security type %s(%d)", secTypeName(secType),secType); --- vnc4-4.1.1+xorg1.0.2.orig/common/rfb/Makefile.in +++ vnc4-4.1.1+xorg1.0.2/common/rfb/Makefile.in @@ -65,4 +65,6 @@ $(AR) $(library) $(OBJS) $(RANLIB) $(library) +DIR_CFLAGS = -DPIC -fPIC +DIR_CXXFLAGS = -DPIC -fPIC # followed by boilerplate.mk --- vnc4-4.1.1+xorg1.0.2.orig/common/rfb/ServerCore.cxx +++ vnc4-4.1.1+xorg1.0.2/common/rfb/ServerCore.cxx @@ -29,7 +29,7 @@ ("IdleTimeout", "The number of seconds after which an idle VNC connection will be dropped " "(zero means no timeout)", - 3600, 0); + 0, 0); rfb::IntParameter rfb::Server::clientWaitTimeMillis ("ClientWaitTimeMillis", "The number of milliseconds to wait for a client which is no longer " --- vnc4-4.1.1+xorg1.0.2.orig/common/rfb/Password.cxx +++ vnc4-4.1.1+xorg1.0.2/common/rfb/Password.cxx @@ -38,6 +38,9 @@ PlainPasswd::PlainPasswd(char* pwd) : CharArray(pwd) { } +PlainPasswd::PlainPasswd(int len) : CharArray(len) { +} + PlainPasswd::PlainPasswd(const ObfuscatedPasswd& obfPwd) : CharArray(9) { if (obfPwd.length < 8) throw rdr::Exception("bad obfuscated password length"); --- vnc4-4.1.1+xorg1.0.2.orig/common/config.status +++ vnc4-4.1.1+xorg1.0.2/common/config.status @@ -0,0 +1,164 @@ +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host salsa: +# +# ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --with-installed-zlib +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]" +for ac_option +do + case "$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running ${CONFIG_SHELL-/bin/sh} ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --with-installed-zlib --no-create --no-recursion" + exec ${CONFIG_SHELL-/bin/sh} ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --with-installed-zlib --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "./config.status generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "$ac_cs_usage"; exit 0 ;; + *) echo "$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=. + +trap 'rm -fr Makefile rdr/Makefile network/Makefile Xregion/Makefile rfb/Makefile conftest*; exit 1' 1 2 15 + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; + s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF +/^[ ]*VPATH[ ]*=[^:]*$/d + +s%@SHELL@%/bin/sh%g +s%@CFLAGS@%-Wall -g -O2 -Wall%g +s%@CPPFLAGS@%%g +s%@CXXFLAGS@%-O2 -Wall%g +s%@FFLAGS@%%g +s%@DEFS@% %g +s%@LDFLAGS@%%g +s%@LIBS@%%g +s%@exec_prefix@%${prefix}%g +s%@prefix@%/usr%g +s%@program_transform_name@%s,x,x,%g +s%@bindir@%${exec_prefix}/bin%g +s%@sbindir@%${exec_prefix}/sbin%g +s%@libexecdir@%${exec_prefix}/libexec%g +s%@datadir@%${prefix}/share%g +s%@sysconfdir@%${prefix}/etc%g +s%@sharedstatedir@%${prefix}/com%g +s%@localstatedir@%${prefix}/var%g +s%@libdir@%${exec_prefix}/lib%g +s%@includedir@%${prefix}/include%g +s%@oldincludedir@%/usr/include%g +s%@infodir@%${prefix}/share/info%g +s%@mandir@%${prefix}/share/man%g +s%@CC@%gcc%g +s%@CXX@%c++%g +s%@RANLIB@%ranlib%g +s%@SET_MAKE@%%g +s%@MITSHM_CPPFLAGS@%-DMITSHM%g +s%@CXXCPP@%c++ -E%g +s%@X_CFLAGS@%%g +s%@X_PRE_LIBS@% -lSM -lICE%g +s%@X_LIBS@% -L/usr/X11R6/lib%g +s%@X_EXTRA_LIBS@%%g +s%@ZLIB_DIR@%%g +s%@ZLIB_INCLUDE@%%g +s%@ZLIB_LIB@%-lz%g +s%@VSNPRINTF_DEFINE@%-DHAVE_VSNPRINTF%g +s%@SOCKLEN_T_DEFINE@%-DVNC_SOCKLEN_T=socklen_t%g + +CEOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi + +CONFIG_FILES=${CONFIG_FILES-"Makefile:Makefile.in:boilerplate.mk rdr/Makefile:rdr/Makefile.in:boilerplate.mk network/Makefile:network/Makefile.in:boilerplate.mk Xregion/Makefile:Xregion/Makefile.in:boilerplate.mk rfb/Makefile:rfb/Makefile.in:boilerplate.mk "} +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + + + +exit 0 --- vnc4-4.1.1+xorg1.0.2.orig/common/network/Makefile +++ vnc4-4.1.1+xorg1.0.2/common/network/Makefile @@ -0,0 +1,54 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. + +SRCS = TcpSocket.cxx + +OBJS = $(SRCS:.cxx=.o) + +DIR_CPPFLAGS = -I$(top_srcdir) -DVNC_SOCKLEN_T=socklen_t + +library = libnetwork.a + +all:: $(library) + +$(library): $(OBJS) + rm -f $(library) + $(AR) $(library) $(OBJS) + $(RANLIB) $(library) + +DIR_CXXFLAGS = -DPIC -fPIC +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/common/network/Makefile.in +++ vnc4-4.1.1+xorg1.0.2/common/network/Makefile.in @@ -14,4 +14,5 @@ $(AR) $(library) $(OBJS) $(RANLIB) $(library) +DIR_CXXFLAGS = -DPIC -fPIC # followed by boilerplate.mk --- vnc4-4.1.1+xorg1.0.2.orig/common/network/TcpSocket.cxx +++ vnc4-4.1.1+xorg1.0.2/common/network/TcpSocket.cxx @@ -54,6 +54,29 @@ static rfb::LogWriter vlog("TcpSocket"); +/* Tunnelling support. */ +int network::findFreeTcpPort (void) +{ + int sock, port; + struct sockaddr_in addr; + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = INADDR_ANY; + + if ((sock = socket (AF_INET, SOCK_STREAM, 0)) < 0) + throw SocketException ("unable to create socket", errorNumber); + + for (port = TUNNEL_PORT_OFFSET + 99; port > TUNNEL_PORT_OFFSET; port--) { + addr.sin_port = htons ((unsigned short) port); + if (bind (sock, (struct sockaddr *)&addr, sizeof (addr)) == 0) { + close (sock); + return port; + } + } + throw SocketException ("no free port in range", 0); + return 0; +} + // -=- Socket initialisation static bool socketsInitialised = false; @@ -117,10 +140,14 @@ } // Attempt to connect to the remote host - if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { - int e = errorNumber; - closesocket(sock); - throw SocketException("unable to connect to host", e); + for (;;) { + if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) { + int e = errorNumber; + if (e == EINTR) + continue; + closesocket(sock); + throw SocketException("unable to connect to host", e); + } else break; } // Disable Nagle's algorithm, to reduce latency --- vnc4-4.1.1+xorg1.0.2.orig/common/network/TcpSocket.h +++ vnc4-4.1.1+xorg1.0.2/common/network/TcpSocket.h @@ -32,8 +32,14 @@ #include +/* Tunnelling support. */ +#define TUNNEL_PORT_OFFSET 5500 + namespace network { + /* Tunnelling support. */ + int findFreeTcpPort (void); + class TcpSocket : public Socket { public: TcpSocket(int sock, bool close=true); --- vnc4-4.1.1+xorg1.0.2.orig/common/Xregion/Makefile +++ vnc4-4.1.1+xorg1.0.2/common/Xregion/Makefile @@ -0,0 +1,52 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. + +SRCS = Region.c + +OBJS = $(SRCS:.c=.o) + +library = libXregion.a + +all:: $(library) + +$(library): $(OBJS) + rm -f $(library) + $(AR) $(library) $(OBJS) + $(RANLIB) $(library) + +DIR_CFLAGS = -DPIC -fPIC +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/common/Xregion/Makefile.in +++ vnc4-4.1.1+xorg1.0.2/common/Xregion/Makefile.in @@ -12,4 +12,5 @@ $(AR) $(library) $(OBJS) $(RANLIB) $(library) +DIR_CFLAGS = -DPIC -fPIC # followed by boilerplate.mk --- vnc4-4.1.1+xorg1.0.2.orig/common/Makefile.in +++ vnc4-4.1.1+xorg1.0.2/common/Makefile.in @@ -1,4 +1,6 @@ SUBDIRS = @ZLIB_DIR@ rdr network Xregion rfb +DIR_CFLAGS = -DPIC -fPIC +DIR_CXXFLAGS = -DPIC -fPIC # followed by boilerplate.mk --- vnc4-4.1.1+xorg1.0.2.orig/common/rdr/Makefile +++ vnc4-4.1.1+xorg1.0.2/common/rdr/Makefile @@ -0,0 +1,56 @@ +# Generated automatically from Makefile.in:boilerplate.mk by configure. + +SRCS = Exception.cxx FdInStream.cxx FdOutStream.cxx InStream.cxx \ + RandomStream.cxx ZlibInStream.cxx ZlibOutStream.cxx \ + HexInStream.cxx HexOutStream.cxx + +OBJS = $(SRCS:.cxx=.o) + +DIR_CPPFLAGS = -I$(top_srcdir) + +library = librdr.a + +all:: $(library) + +$(library): $(OBJS) + rm -f $(library) + $(AR) $(library) $(OBJS) + $(RANLIB) $(library) + +DIR_CXXFLAGS = -DPIC -fPIC +# followed by boilerplate.mk + +all:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + @subdirs="$(SUBDIRS)"; for d in $$subdirs; do (cd $$d; $(MAKE) $@) || exit 1; done + +clean:: + rm -f $(program) $(library) *.o + +SHELL = /bin/sh +top_srcdir = .. + +CC = gcc +CFLAGS = -Wall -g -O2 -Wall $(DIR_CFLAGS) +CCLD = $(CC) +CXX = c++ +CXXFLAGS = -O2 -Wall $(DIR_CXXFLAGS) +CXXLD = $(CXX) +CPPFLAGS = +DEFS = +ALL_CPPFLAGS = $(CPPFLAGS) $(DEFS) $(DIR_CPPFLAGS) +LIBS = +LDFLAGS = +RANLIB = ranlib +AR = ar cq + +.SUFFIXES: +.SUFFIXES: .cxx .c .o + +.c.o: + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c $< + +.cxx.o: + $(CXX) $(ALL_CPPFLAGS) $(CXXFLAGS) -c $< --- vnc4-4.1.1+xorg1.0.2.orig/common/rdr/Makefile.in +++ vnc4-4.1.1+xorg1.0.2/common/rdr/Makefile.in @@ -16,4 +16,5 @@ $(AR) $(library) $(OBJS) $(RANLIB) $(library) +DIR_CXXFLAGS = -DPIC -fPIC # followed by boilerplate.mk