Subversion Repositories ssvnc

Compare Revisions

Ignore whitespace Rev 48 → Rev 49

/ssvnc/tags/1.0.29-3/debian/control
New file
0,0 → 1,33
Source: ssvnc
Section: net
Priority: extra
Maintainer: Magnus Holmgren <holmgren@debian.org>
Build-Depends: dpkg-dev (>= 1.15.7), debhelper (>= 7), xutils-dev, libxaw7-dev,
libxmu-dev, libxext-dev, libxt-dev, libsm-dev, libice-dev,
libjpeg-dev, zlib1g-dev | libz-dev,
default-jdk, libssl-dev, dh-strip-nondeterminism
Standards-Version: 3.9.8
Homepage: http://www.karlrunge.com/x11vnc/ssvnc.html
 
Package: ssvnc
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, tk,
openssh-client, bind9-host | host, procps, psmisc, xterm,
stunnel4, openssl
Recommends: default-jre | java5-runtime
Description: Enhanced TightVNC viewer with SSL/SSH tunnel helper
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.
.
SSVNC is two things:
.
* An enhanced version of the TightVNC client with support for more
encodings and color modes, support for x11vnc and UltraVNC
extensions, dynamic screen resizing, an improved popup menu, etc.
.
* A GUI that helps set up an SSL (using stunnel) or SSH tunnel to
connect to the VNC server through, as well as forwarding of ports for
audio (esound/aRts), SMB, CUPS etc.
/ssvnc/tags/1.0.29-3/debian/links
New file
0,0 → 1,3
usr/share/man/man1/ssvnc.1.gz usr/share/man/man1/sshvnc.1.gz
usr/share/man/man1/ssvnc.1.gz usr/share/man/man1/tsvnc.1.gz
usr/lib/ssvnc/vncviewer usr/bin/ssvncviewer
/ssvnc/tags/1.0.29-3/debian/source/format
New file
0,0 → 1,0
3.0 (quilt)
/ssvnc/tags/1.0.29-3/debian/compat
New file
0,0 → 1,0
7
/ssvnc/tags/1.0.29-3/debian/watch
New file
0,0 → 1,2
version=3
http://sf.net/ssvnc/ssvnc-(.*)\.src\.tar\.gz
/ssvnc/tags/1.0.29-3/debian/changelog
New file
0,0 → 1,102
ssvnc (1.0.29-3) unstable; urgency=low
 
* debian/rules: Add call to dh_strip_nondeterminism.
* openssl1.1.patch (new): Support OpenSSL 1.1 API changes (Closes:
#828559).
* auto-scale.patch (new): Make autoscaling work (Closes: #801804, LP:
#1312966). In addition to the command-line option "-scale auto"
creating a 1×1 window, rescaling when resizing the window didn't
happen, at least not when Caps Lock or other modifiers were active.
* samemachine_ipv6_overflow.patch (new): Fix stack overflow when
connecting over IPv6, caused by non-IPv6-aware code (Closes: #774622).
* nostrip.patch: Don't strip vncstorepw or ultravnc_dsm_helper either.
* buildflags.patch: Also pass flags to vncstorepw/Makefile and patch
that to use them.
* Bump Standards-Version to 3.9.8.
 
-- Magnus Holmgren <holmgren@debian.org> Sat, 30 Jul 2016 23:09:44 +0200
 
ssvnc (1.0.29-2) unstable; urgency=low
 
* Also get CPPFLAGS from dpkg-buildflags. Pass it as EXTRA_DEFINES to
vnc_unixsrc/*/Makefile.
 
-- Magnus Holmgren <holmgren@debian.org> Fri, 11 Nov 2011 08:11:09 +0100
 
ssvnc (1.0.29-1) unstable; urgency=low
 
* New upstream release.
* Install ReleaseNotes as upstream changelog file.
* Simply build-depend on libjpeg-dev instead of libjpeg62-dev |
libjpeg-dev (Closes: #644808).
* Install a symlink in /usr/bin instead of including the main vncviewer
binary twice in the package.
* Add build-arch and build-indep targets to debian/rules.
* nostrip.patch: Remove strip command from the Makefile, allowing
DEB_BUILD_OPTONS=nostrip to work.
* Get CFLAGS and LDFLAGS from dpkg-buildflags.
* buildflags.patch: Pass CFLAGS and LDFLAGS through via ./Makefile as
CDEBUGFLAGS and LOCAL_LDFLAGS to vnc_unixsrc/*/Makefile. This results
in -fno-strict-aliasing (added by xmkmf by default) being dropped, but
that doesn't seem to cause any problems.
* format-security.patch: Fix some flaws uncovered by -Wformat-security.
* Bump Standards-Version to 3.9.2.
 
-- Magnus Holmgren <holmgren@debian.org> Thu, 10 Nov 2011 22:23:15 +0100
 
ssvnc (1.0.28-1) unstable; urgency=low
 
* New upstream release (Closes: #592873, "Connection from UVNC
Single-Click does not start vncviewer when -acceptpopups is set").
* Convert to source format 3.0 (quilt), changing /bin/sh into /bin/bash
(see below) in the install target instead.
* debian/copyright: Update years of copyright; remove notice that the
UltraVNC DSM helper module is not included (which it is since
1.0.24-1).
* Remove redundant bash dependency; bash isn't going to be non-essential
any time soon.
* Up Standards-Version to 3.9.1.
 
-- Magnus Holmgren <holmgren@debian.org> Sun, 06 Feb 2011 23:06:25 +0100
 
ssvnc (1.0.27-1) unstable; urgency=low
 
* New upstream release.
* bashisms.dpatch: Don't try to fix all bashisms; instead change /bin/sh
to /bin/bash and depend on bash, which is small in this context.
 
-- Magnus Holmgren <holmgren@debian.org> Sun, 23 May 2010 19:07:52 +0200
 
ssvnc (1.0.25-1) unstable; urgency=low
 
* New upstream release.
* confusing_-h.dpatch and bashisms.dpatch: adjusted.
 
-- Magnus Holmgren <holmgren@debian.org> Sat, 06 Feb 2010 20:45:04 +0100
 
ssvnc (1.0.24-1) unstable; urgency=low
 
* New upstream release.
* ssvnc -help now prints a help message instead of passing -help to the
tcl interpreter.
* confusing_-h.dpatch (new): Improve upstream's handling of -help a bit
(Closes: 544250).
* ultraftp_path.dpach (new): Use hardcoded (and correct for this
package) path to ultraftp.jar if SSVNC_ULTRA_FTP_JAR is unset, so that
file transfers work even if ssvncviewer is executed directly.
* bashisms.dpatch (new): Fix most bashisms (all that matter).
* Drop no_openssl.dpatch and build ultravnc_dsm_helper; OpenSSL
exception has been granted. Build-depend on libssl-dev.
* Promote stunnel4 from Recommends to Depends (Closes: #553411), depend
directly on openssl, depend on tk instead of tk8.4, and tweak java
recommendations.
* Add README.source.
* Bump Standards-Version to 3.8.3.
 
-- Magnus Holmgren <holmgren@debian.org> Sat, 31 Oct 2009 21:02:42 +0100
 
ssvnc (1.0.23-1) unstable; urgency=low
 
* Initial release (Closes: #504134).
 
-- Magnus Holmgren <holmgren@debian.org> Sat, 01 Aug 2009 19:31:25 +0200
/ssvnc/tags/1.0.29-3/debian/patches/confusing_-h.patch
New file
0,0 → 1,36
Description: Improve handling of -h[e[l[p]]]
Catches -he and -hel as well, instead of letting wish print its usage
message (that sounds like an error message).
Author: Magnus Holmgren <holmgren@debian.org>
Bug-Debian: http://bugs.debian.org/544250
 
--- a/scripts/ssvnc
+++ b/scripts/ssvnc
@@ -8,7 +8,8 @@
#
# See ssvnc_cmd for details.
#
-if [ "X$1" = "X-help" -o "X$1" = "X-h" ]; then
+helpflag="-help"
+if [ ${#1} -gt 1 -a "$1${helpflag##$1}" = $helpflag ]; then
cat << END
ssvnc - a GUI wrapper for SSL and SSH VNC connections.
@@ -111,7 +112,7 @@ END
exit 0
fi
if [ "X$1" = "X-ssh" ]; then
- if [ "X$2" = "X-help" -o "X$2" = "X-h" ]; then
+ if [ ${#2} -gt 1 -a "$2${helpflag##$2}" = $helpflag ]; then
cat << END
sshvnc - a GUI wrapper for SSH VNC connections.
@@ -129,7 +130,7 @@ END
fi
if [ "X$1" = "X-ts" -o "X$1" = "X-tso" ]; then
- if [ "X$2" = "X-help" -o "X$2" = "X-h" ]; then
+ if [ ${#2} -gt 1 -a "$2${helpflag##$2}" = $helpflag ]; then
cat << END
tsvnc - a GUI wrapper for SSH VNC connections using x11vnc Terminal Services.
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: ssvnc/tags/1.0.29-3/debian/patches/openssl1.1.patch
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/openssl1.1.patch (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/openssl1.1.patch (revision 49)
@@ -0,0 +1,199 @@
+--- a/vncstorepw/ultravnc_dsm_helper.c
++++ b/vncstorepw/ultravnc_dsm_helper.c
+@@ -414,7 +414,9 @@ void enc_do(char *ciph, char *keyfile, c
+ if (strstr(p, "md5+") == p) {
+ Digest = EVP_md5(); p += strlen("md5+");
+ } else if (strstr(p, "sha+") == p) {
+- Digest = EVP_sha(); p += strlen("sha+");
++ fprintf(stderr, "%s: obsolete hash algorithm: SHA-0\n",
++ prog, s);
++ exit(1);
+ } else if (strstr(p, "sha1+") == p) {
+ Digest = EVP_sha1(); p += strlen("sha1+");
+ } else if (strstr(p, "ripe+") == p) {
+@@ -655,8 +657,10 @@ static void enc_xfer(int sock_fr, int so
+ */
+ unsigned char E_keystr[EVP_MAX_KEY_LENGTH];
+ unsigned char D_keystr[EVP_MAX_KEY_LENGTH];
+- EVP_CIPHER_CTX E_ctx, D_ctx;
+- EVP_CIPHER_CTX *ctx = NULL;
++ //openssl1.1.patch - Do NOT create two context and only use one
++ // - that's silly.
++ //EVP_CIPHER_CTX *E_ctx, *D_ctx;
++ EVP_CIPHER_CTX *ctx;
+
+ unsigned char buf[BSIZE], out[BSIZE];
+ unsigned char *psrc = NULL, *keystr;
+@@ -698,11 +702,14 @@ static void enc_xfer(int sock_fr, int so
+ encsym = encrypt ? "+" : "-";
+
+ /* use the encryption/decryption context variables below */
++ ctx = EVP_CIPHER_CTX_new();
++ if (!ctx) {
++ fprintf(stderr, "Failed to create encryption/decryption context.\n");
++ goto finished;
++ }
+ if (encrypt) {
+- ctx = &E_ctx;
+ keystr = E_keystr;
+ } else {
+- ctx = &D_ctx;
+ keystr = D_keystr;
+ }
+
+@@ -797,7 +804,6 @@ static void enc_xfer(int sock_fr, int so
+ if (whoops) {
+ fprintf(stderr, "%s: %s - WARNING: MSRC4 mode and IGNORING random salt\n", prog, encstr);
+ fprintf(stderr, "%s: %s - WARNING: and initialization vector!!\n", prog, encstr);
+- EVP_CIPHER_CTX_init(ctx);
+ if (pw_in) {
+ /* for pw=xxxx a md5 hash is used */
+ EVP_BytesToKey(Cipher, Digest, NULL, (unsigned char *) keydata,
+@@ -816,7 +822,6 @@ static void enc_xfer(int sock_fr, int so
+
+ EVP_BytesToKey(Cipher, Digest, NULL, (unsigned char *) keydata,
+ keydata_len, 1, keystr, ivec);
+- EVP_CIPHER_CTX_init(ctx);
+ EVP_CipherInit_ex(ctx, Cipher, NULL, keystr, ivec,
+ encrypt);
+ }
+@@ -836,9 +841,9 @@ static void enc_xfer(int sock_fr, int so
+ in_salt = salt;
+ }
+
+- if (ivec_size < Cipher->iv_len && !securevnc) {
++ if (ivec_size < EVP_CIPHER_iv_length(Cipher) && !securevnc) {
+ fprintf(stderr, "%s: %s - WARNING: short IV %d < %d\n",
+- prog, encstr, ivec_size, Cipher->iv_len);
++ prog, encstr, ivec_size, EVP_CIPHER_iv_length(Cipher));
+ }
+
+ /* make the hashed value and place in keystr */
+@@ -877,9 +882,6 @@ static void enc_xfer(int sock_fr, int so
+ }
+
+
+- /* initialize the context */
+- EVP_CIPHER_CTX_init(ctx);
+-
+
+ /* set the cipher & initialize */
+
+@@ -986,6 +988,7 @@ static void enc_xfer(int sock_fr, int so
+ /* transfer done (viewer exited or some error) */
+ finished:
+
++ if (ctx) EVP_CIPHER_CTX_free(ctx);
+ fprintf(stderr, "\n%s: %s - close sock_to\n", prog, encstr);
+ close(sock_to);
+
+@@ -1060,14 +1063,14 @@ static int securevnc_server_rsa_save_dia
+ }
+
+ static char *rsa_md5_sum(unsigned char* rsabuf) {
+- EVP_MD_CTX md;
++ EVP_MD_CTX *md = EVP_MD_CTX_create();
+ char digest[EVP_MAX_MD_SIZE], tmp[16];
+ char md5str[EVP_MAX_MD_SIZE * 8];
+ unsigned int i, size = 0;
+
+- EVP_DigestInit(&md, EVP_md5());
+- EVP_DigestUpdate(&md, rsabuf, SECUREVNC_RSA_PUBKEY_SIZE);
+- EVP_DigestFinal(&md, (unsigned char *)digest, &size);
++ EVP_DigestInit(md, EVP_md5());
++ EVP_DigestUpdate(md, rsabuf, SECUREVNC_RSA_PUBKEY_SIZE);
++ EVP_DigestFinal(md, (unsigned char *)digest, &size);
+
+ memset(md5str, 0, sizeof(md5str));
+ for (i=0; i < size; i++) {
+@@ -1075,6 +1078,7 @@ static char *rsa_md5_sum(unsigned char*
+ sprintf(tmp, "%02x", (int) uc);
+ strcat(md5str, tmp);
+ }
++ EVP_MD_CTX_destroy(md);
+ return strdup(md5str);
+ }
+
+@@ -1184,7 +1188,7 @@ static void sslexit(char *msg) {
+
+ static void securevnc_setup(int conn1, int conn2) {
+ RSA *rsa = NULL;
+- EVP_CIPHER_CTX init_ctx;
++ EVP_CIPHER_CTX *init_ctx = EVP_CIPHER_CTX_new();
+ unsigned char keystr[EVP_MAX_KEY_LENGTH];
+ unsigned char *rsabuf, *rsasav;
+ unsigned char *encrypted_keybuf;
+@@ -1203,6 +1207,8 @@ static void securevnc_setup(int conn1, i
+
+ ERR_load_crypto_strings();
+
++ if (!init_ctx) sslexit("securevnc_setup: EVP_CIPHER_CTX_new() failed");
++
+ /* alloc and read from server the 270 comprising the rsa public key: */
+ rsabuf = (unsigned char *) calloc(SECUREVNC_RSA_PUBKEY_SIZE, 1);
+ rsasav = (unsigned char *) calloc(SECUREVNC_RSA_PUBKEY_SIZE, 1);
+@@ -1323,8 +1329,7 @@ static void securevnc_setup(int conn1, i
+ /*
+ * Back to the work involving the tmp obscuring key:
+ */
+- EVP_CIPHER_CTX_init(&init_ctx);
+- rc = EVP_CipherInit_ex(&init_ctx, EVP_rc4(), NULL, initkey, NULL, 1);
++ rc = EVP_CipherInit_ex(init_ctx, EVP_rc4(), NULL, initkey, NULL, 1);
+ if (rc == 0) {
+ sslexit("securevnc_setup: EVP_CipherInit_ex(init_ctx) failed");
+ }
+@@ -1340,13 +1345,13 @@ static void securevnc_setup(int conn1, i
+ /* decode with the tmp key */
+ if (n > 0) {
+ memset(to_viewer, 0, sizeof(to_viewer));
+- if (EVP_CipherUpdate(&init_ctx, to_viewer, &len, buf, n) == 0) {
++ if (EVP_CipherUpdate(init_ctx, to_viewer, &len, buf, n) == 0) {
+ sslexit("securevnc_setup: EVP_CipherUpdate(init_ctx) failed");
+ exit(1);
+ }
+ to_viewer_len = len;
+ }
+- EVP_CIPHER_CTX_cleanup(&init_ctx);
++ EVP_CIPHER_CTX_free(init_ctx);
+ free(initkey);
+
+ /* print what we would send to the viewer (sent below): */
+@@ -1407,7 +1412,7 @@ static void securevnc_setup(int conn1, i
+
+ if (client_auth_req && client_auth) {
+ RSA *client_rsa = load_client_auth(client_auth);
+- EVP_MD_CTX dctx;
++ EVP_MD_CTX *dctx = EVP_MD_CTX_create();
+ unsigned char digest[EVP_MAX_MD_SIZE], *signature;
+ unsigned int ndig = 0, nsig = 0;
+
+@@ -1421,8 +1426,8 @@ static void securevnc_setup(int conn1, i
+ exit(1);
+ }
+
+- EVP_DigestInit(&dctx, EVP_sha1());
+- EVP_DigestUpdate(&dctx, keystr, SECUREVNC_KEY_SIZE);
++ EVP_DigestInit(dctx, EVP_sha1());
++ EVP_DigestUpdate(dctx, keystr, SECUREVNC_KEY_SIZE);
+ /*
+ * Without something like the following MITM is still possible.
+ * This is because the MITM knows keystr and can use it with
+@@ -1433,7 +1438,7 @@ static void securevnc_setup(int conn1, i
+ * he doesn't have Viewer_ClientAuth.pkey.
+ */
+ if (0) {
+- EVP_DigestUpdate(&dctx, rsasav, SECUREVNC_RSA_PUBKEY_SIZE);
++ EVP_DigestUpdate(dctx, rsasav, SECUREVNC_RSA_PUBKEY_SIZE);
+ if (!keystore_verified) {
+ fprintf(stderr, "securevnc_setup:\n");
+ fprintf(stderr, "securevnc_setup: Warning: even *WITH* Client Authentication in SecureVNC,\n");
+@@ -1456,7 +1461,8 @@ static void securevnc_setup(int conn1, i
+ fprintf(stderr, "securevnc_setup:\n");
+ }
+ }
+- EVP_DigestFinal(&dctx, (unsigned char *)digest, &ndig);
++ EVP_DigestFinal(dctx, (unsigned char *)digest, &ndig);
++ EVP_MD_CTX_destroy(dctx);
+
+ signature = (unsigned char *) calloc(RSA_size(client_rsa), 1);
+ RSA_sign(NID_sha1, digest, ndig, signature, &nsig, client_rsa);
Index: ssvnc/tags/1.0.29-3/debian/patches/samemachine_ip6_overflow.patch
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/samemachine_ip6_overflow.patch (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/samemachine_ip6_overflow.patch (revision 49)
@@ -0,0 +1,44 @@
+Description: Use a struct sockaddr_storage to retrieve local and peer addresses and compare according to address family.
+ Also check if -rawlocal was specified before even checking whether the remote machine is the local one.
+Bug-Debian: https://bugs.debian.org/774622
+
+--- a/vnc_unixsrc/vncviewer/sockets.c
++++ b/vnc_unixsrc/vncviewer/sockets.c
+@@ -1165,13 +1165,21 @@ char *ip2host(char *ip) {
+ Bool
+ SameMachine(int sock)
+ {
+- struct sockaddr_in peeraddr, myaddr;
+- int addrlen = sizeof(struct sockaddr_in);
++ struct sockaddr_storage peeraddr, myaddr;
++ int addrlen = sizeof(struct sockaddr_storage);
+
+ getpeername(sock, (struct sockaddr *)&peeraddr, &addrlen);
+ getsockname(sock, (struct sockaddr *)&myaddr, &addrlen);
+
+- return (peeraddr.sin_addr.s_addr == myaddr.sin_addr.s_addr);
++ assert(((struct sockaddr*)&peeraddr)->sa_family == ((struct sockaddr*)&myaddr)->sa_family);
++ if (((struct sockaddr*)&myaddr)->sa_family == AF_INET6) {
++ return 0 == memcmp(&((struct sockaddr_in6*)&peeraddr)->sin6_addr.s6_addr,
++ &((struct sockaddr_in6*)&myaddr)->sin6_addr.s6_addr,
++ sizeof(struct in6_addr));
++ } else {
++ return ((struct sockaddr_in*)&peeraddr)->sin_addr.s_addr
++ == ((struct sockaddr_in*)&myaddr)->sin_addr.s_addr;
++ }
+ }
+
+
+--- a/vnc_unixsrc/vncviewer/rfbproto.c
++++ b/vnc_unixsrc/vncviewer/rfbproto.c
+@@ -2204,8 +2204,8 @@ if (getenv("DEBUG_SETFORMAT")) {
+ } else {
+ /* DIFFERENT CASE */
+
+- if (SameMachine(rfbsock)) {
+- if (!tunnelSpecified && appData.useRawLocal) {
++ if (appData.useRawLocal && SameMachine(rfbsock)) {
++ if (!tunnelSpecified) {
+ fprintf(stderr,"Same machine: preferring raw encoding\n");
+ encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRaw);
+ } else {
Index: ssvnc/tags/1.0.29-3/debian/patches/buildflags.patch
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/buildflags.patch (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/buildflags.patch (revision 49)
@@ -0,0 +1,32 @@
+Author: Magnus Holmgren <holmgren@debian.org>
+Description: Pass CFLAGS and LDFLAGS to xmkmf-generated Makefiles
+ Pass CFLAGS and LDFLAGS through via ./Makefile as
+ CDEBUGFLAGS and LOCAL_LDFLAGS to vnc_unixsrc/*/Makefile
+
+--- a/Makefile
++++ b/Makefile
+@@ -53,10 +53,10 @@ config:
+ @echo Now run: "'make all'"
+
+ all:
+- cd $(VSRC)/libvncauth; $(MAKE)
+- cd $(VSRC)/vncviewer; $(MAKE)
++ cd $(VSRC)/libvncauth; $(MAKE) EXTRA_DEFINES="$(CPPFLAGS)" CDEBUGFLAGS="$(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)"
++ cd $(VSRC)/vncviewer; $(MAKE) EXTRA_DEFINES="$(CPPFLAGS)" CDEBUGFLAGS="$(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)"
+ if [ "X$(JSRC)" != "X" ]; then cd $(JSRC); $(MAKE); fi
+- cd $(PSRC); $(MAKE)
++ cd $(PSRC); $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+
+ clean:
+ cd $(VSRC)/libvncauth; $(MAKE) clean
+--- a/vncstorepw/Makefile
++++ b/vncstorepw/Makefile
+@@ -8,7 +8,7 @@ LIMACC = lim_accept.so
+ ULTDSM = ultravnc_dsm_helper
+
+ # gcc must be used:
+-CC = gcc
++CC = gcc $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
+
+ all: $(CMD) $(UNWRAP) $(LIMACC) $(ULTDSM)
+
Index: ssvnc/tags/1.0.29-3/debian/patches/series
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/series (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/series (revision 49)
@@ -0,0 +1,8 @@
+confusing_-h.patch
+ultraftp_path.patch
+nostrip.patch
+buildflags.patch
+format-security.patch
+openssl1.1.patch
+auto-scale.patch
+samemachine_ip6_overflow.patch
Index: ssvnc/tags/1.0.29-3/debian/patches/auto-scale.patch
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/auto-scale.patch (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/auto-scale.patch (revision 49)
@@ -0,0 +1,117 @@
+Description: Make autoscaling work.
+ 1) Add a StructureNotifyMask event handler to be notified of windows resizings,
+ rather than checking for size changes twice every second in the Expose handler.
+ Using the size of "form" seems to work best. Skip checking for pressed mouse
+ buttons - those shouldn't matter in this situation, and the old code aborted
+ if modifier keys were pressed or Caps Lock or Num Lock active.
+ 2) Avoid freaking out if the windows haven't been realized yet -
+ instead use scale factor 1. This prevented setting -scale auto
+ on the command line from working.
+Bug: https://sourceforge.net/p/ssvnc/bugs/5/
+Bug-Debian: https://bugs.debian.org/801804
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ssvnc/+bug/1312966
+
+--- a/vnc_unixsrc/vncviewer/desktop.c
++++ b/vnc_unixsrc/vncviewer/desktop.c
+@@ -55,6 +55,7 @@ static Cursor CreateDotCursor();
+ static void CopyBGR233ToScreen(CARD8 *buf, int x, int y, int width,int height);
+ static void HandleBasicDesktopEvent(Widget w, XtPointer ptr, XEvent *ev,
+ Boolean *cont);
++static void HandleResizeEvent(Widget w, XtPointer ptr, XEvent *ev, Boolean *cont);
+
+ static void CopyBGR565ToScreen(CARD16 *buf, int x, int y, int width,int height);
+
+@@ -110,6 +111,8 @@ void get_scale_values(double *fx, double
+ if (w > 32 && h > 32) {
+ frac_x = ((double) w) / ((double) xmax);
+ frac_y = ((double) h) / ((double) ymax);
++ } else {
++ frac_x = frac_y = 1.0;
+ }
+ }
+ if (frac_x < 0.0 && sscanf(s, "%lf", &f) == 1) {
+@@ -456,7 +459,11 @@ void create_image() {
+ scale_x = w;
+ scale_y = h;
+
+- XtVaSetValues(toplevel, XtNmaxWidth, w, XtNmaxHeight, hyc, NULL);
++ if (!strcmp(appData.scale, "auto")) {
++ XtVaSetValues(toplevel, XtNmaxWidth, dpyWidth, XtNmaxHeight, dpyHeight, NULL);
++ } else {
++ XtVaSetValues(toplevel, XtNmaxWidth, w, XtNmaxHeight, hyc, NULL);
++ }
+
+ h2 = scale_round(si.framebufferHeight, frac_y);
+ XtVaSetValues(desktop, XtNwidth, w, XtNheight, h2, NULL);
+@@ -561,6 +568,8 @@ DesktopInitBeforeRealization()
+
+ XtAddEventHandler(desktop, LeaveWindowMask|EnterWindowMask|ExposureMask,
+ True, HandleBasicDesktopEvent, NULL);
++ XtAddEventHandler(form, StructureNotifyMask,
++ False, HandleResizeEvent, NULL);
+
+ if (appData.yCrop) {
+ int hm;
+@@ -707,39 +716,6 @@ void check_things() {
+ dpyWidth = WidthOfScreen(DefaultScreenOfDisplay(dpy));
+ dpyHeight = HeightOfScreen(DefaultScreenOfDisplay(dpy));
+
+- if (appData.scale != NULL) {
+- static Dimension last_w = 0, last_h = 0;
+- static double last_resize = 0.0;
+- Dimension w, h;
+- if (last_w == 0) {
+- XtVaGetValues(toplevel, XtNwidth, &last_w, XtNheight, &last_h, NULL);
+- last_resize = now;
+- }
+- if (now < last_resize + 0.5) {
+- ;
+- } else if (appData.fullScreen) {
+- ;
+- } else if (!strcmp(appData.scale, "auto")) {
+- XtVaGetValues(toplevel, XtNwidth, &w, XtNheight, &h, NULL);
+- if (w < 32 || h < 32) {
+- ;
+- } else if (last_w != w || last_h != h) {
+- Window rr, cr, r = DefaultRootWindow(dpy);
+- int rx, ry, wx, wy;
+- unsigned int mask;
+- /* make sure mouse buttons not pressed */
+- if (XQueryPointer(dpy, r, &rr, &cr, &rx, &ry, &wx, &wy, &mask)) {
+- if (mask == 0) {
+- rescale_image();
+- last_w = w;
+- last_h = h;
+- last_resize = dnow();
+- }
+- }
+- }
+- }
+- }
+-
+ last = dnow();
+ }
+
+@@ -1546,6 +1522,22 @@ void releaseAllPressedModifiers(void) {
+
+ #define PR_EXPOSE fprintf(stderr, "Expose: %04dx%04d+%04d+%04d %04d/%04d/%04d now: %8.4f rescale: %8.4f fullscreen: %8.4f\n", width, height, x, y, si.framebufferWidth, appData.yCrop, si.framebufferHeight, now - start_time, now - last_rescale, now - last_fullscreen);
+
++static void
++HandleResizeEvent(Widget wdg, XtPointer ptr, XEvent *ev, Boolean *cont)
++{
++ static Dimension last_w = 0, last_h = 0;
++ Dimension w, h;
++
++ if (ev->type == ConfigureNotify && !appData.fullScreen
++ && appData.scale != NULL && !strcasecmp(appData.scale, "auto")) {
++ XtVaGetValues(form, XtNwidth, &w, XtNheight, &h, NULL);
++ if (w != last_w || h != last_h) {
++ rescale_image();
++ last_w = w;
++ last_h = h;
++ }
++ }
++}
+ /*
+ * HandleBasicDesktopEvent - deal with expose and leave events.
+ */
Index: ssvnc/tags/1.0.29-3/debian/patches/format-security.patch
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/format-security.patch (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/format-security.patch (revision 49)
@@ -0,0 +1,96 @@
+Author: Magnus Holmgren <holmgren@debian.org>
+Description: Fix format-security warnings/errors
+ Replaces fprintf(stderr, str) with fputs(str, stderr) (where str in
+ most cases is argv[0]) and also one instance of sprintf (without
+ format string) with snprintf (with format string).
+
+--- a/vnc_unixsrc/vncviewer/sockets.c
++++ b/vnc_unixsrc/vncviewer/sockets.c
+@@ -482,7 +482,7 @@ fprintf(stderr, "R0: %06d\n", (int) dn);
+ ProcessXtEvents();
+ i = 0;
+ } else {
+- fprintf(stderr,programName);
++ fputs(programName,stderr);
+ perror(": read");
+ return False;
+ }
+@@ -514,7 +514,7 @@ fprintf(stderr, "R1: %06d %06d %10.2f KB
+ ProcessXtEvents();
+ i = 0;
+ } else {
+- fprintf(stderr,programName);
++ fputs(programName,stderr);
+ perror(": read");
+ return False;
+ }
+@@ -569,13 +569,13 @@ WriteExact(int sock, char *buf, int n)
+ FD_SET(rfbsock,&fds);
+
+ if (select(rfbsock+1, NULL, &fds, NULL, NULL) <= 0) {
+- fprintf(stderr,programName);
++ fputs(programName,stderr);
+ perror(": select");
+ return False;
+ }
+ j = 0;
+ } else {
+- fprintf(stderr,programName);
++ fputs(programName,stderr);
+ perror(": write");
+ return False;
+ }
+@@ -608,13 +608,13 @@ ConnectToUnixSocket(char *file) {
+
+ sock = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (sock < 0) {
+- fprintf(stderr,programName);
++ fputs(programName,stderr);
+ perror(": ConnectToUnixSocket: socket");
+ return -1;
+ }
+
+ if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
+- fprintf(stderr, programName);
++ fputs(programName,stderr);
+ perror(": ConnectToUnixSocket: connect");
+ close(sock);
+ return -1;
+@@ -880,7 +880,7 @@ FindFreeTcpPort(void)
+
+ sock = socket(AF_INET, SOCK_STREAM, 0);
+ if (sock < 0) {
+- fprintf(stderr,programName);
++ fputs(programName,stderr);
+ perror(": FindFreeTcpPort: socket");
+ return 0;
+ }
+@@ -1084,7 +1084,7 @@ Bool
+ SetNonBlocking(int sock)
+ {
+ if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) {
+- fprintf(stderr,programName);
++ fputs(programName,stderr);
+ perror(": AcceptTcpConnection: fcntl");
+ return False;
+ }
+--- a/vnc_unixsrc/vncviewer/vncviewer.c
++++ b/vnc_unixsrc/vncviewer/vncviewer.c
+@@ -130,7 +130,7 @@ void unixpw(char *instr, int vencrypt_pl
+ if (strlen(u) >= 100) {
+ exit(1);
+ }
+- sprintf(username, u);
++ snprintf(username, sizeof(username), "%s", u);
+ p = DoPasswordDialog();
+ } else {
+ raiseme(1);
+@@ -1133,7 +1133,7 @@ void printChat(char *str, Bool raise) {
+ if (raise) {
+ raiseme(0);
+ }
+- fprintf(stderr, str);
++ fputs(str, stderr);
+ } else {
+ if (raise) {
+ ShowChat(0, 0, 0, 0);
Index: ssvnc/tags/1.0.29-3/debian/patches/ultraftp_path.patch
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/ultraftp_path.patch (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/ultraftp_path.patch (revision 49)
@@ -0,0 +1,44 @@
+Author: Magnus Holmgren <holmgren@debian.org>
+Description: Use hardcoded (and correct for the Debian package) path to ultraftp.jar
+ if SSVNC_ULTRA_FTP_JAR is unset.
+
+--- a/vnc_unixsrc/vncviewer/argsresources.c
++++ b/vnc_unixsrc/vncviewer/argsresources.c
+@@ -1702,35 +1702,8 @@ GetArgsAndResources(int argc, char **arg
+ appData.useBGR233 = 0;
+ }
+
+- if (getenv("SSVNC_ULTRA_FTP_JAR") == NULL && programName != NULL) {
+- int len = strlen(programName) + 200;
+- char *q, *jar = (char *) malloc(len);
+-
+- sprintf(jar, "%s", programName);
+- q = strrchr(jar, '/');
+- if (q) {
+- struct stat sb;
+- *(q+1) = '\0';
+- strcat(jar, "../lib/ssvnc/util/ultraftp.jar");
+- if (stat(jar, &sb) == 0) {
+- char *put = (char *) malloc(len);
+- sprintf(put, "SSVNC_ULTRA_FTP_JAR=%s", jar);
+- fprintf(stderr, "Setting: %s\n\n", put);
+- putenv(put);
+- } else {
+- sprintf(jar, "%s", programName);
+- q = strrchr(jar, '/');
+- *(q+1) = '\0';
+- strcat(jar, "util/ultraftp.jar");
+- if (stat(jar, &sb) == 0) {
+- char *put = (char *) malloc(len);
+- sprintf(put, "SSVNC_ULTRA_FTP_JAR=%s", jar);
+- fprintf(stderr, "Setting: %s\n\n", put);
+- putenv(put);
+- }
+- }
+- }
+- free(jar);
++ if (getenv("SSVNC_ULTRA_FTP_JAR") == NULL) {
++ putenv("SSVNC_ULTRA_FTP_JAR=/usr/lib/ssvnc/util/ultraftp.jar");
+ }
+
+
/ssvnc/tags/1.0.29-3/debian/patches/ultraftp_path.patch
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: ssvnc/tags/1.0.29-3/debian/patches/nostrip.patch
===================================================================
--- ssvnc/tags/1.0.29-3/debian/patches/nostrip.patch (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/patches/nostrip.patch (revision 49)
@@ -0,0 +1,30 @@
+Description: Don't strip ssvncviewer; let dh_strip handle that (or not, depending on build options)
+
+--- a/Makefile
++++ b/Makefile
+@@ -66,7 +66,6 @@ clean:
+
+ install: all
+ mkdir -p $(ROOT)$(PREFIX)/$(BIN) $(ROOT)$(PREFIX)/$(LIB) $(ROOT)$(PREFIX)/$(MANDIR)/man1
+- strip $(VIEWER)
+ cp -p $(VIEWER) $(ROOT)$(PREFIX)/$(LIB)
+ cp -p $(VNCSPW) $(ROOT)$(PREFIX)/$(LIB)
+ cp -p $(UNWRAP) $(ROOT)$(PREFIX)/$(LIB)
+--- a/vncstorepw/Makefile
++++ b/vncstorepw/Makefile
+@@ -14,7 +14,6 @@ all: $(CMD) $(UNWRAP) $(LIMACC) $(ULTDSM
+
+ $(CMD): vncauth.o vncstorepw.o d3des.o
+ PATH=$$PATH:$(EPATH) $(CC) -o $(CMD) vncstorepw.o vncauth.o d3des.o
+- PATH=$$PATH:$(EPATH) strip $(CMD)
+ @ls -l $(CMD)
+
+ $(UNWRAP): unwrap.c
+@@ -41,7 +40,6 @@ $(ULTDSM): ultravnc_dsm_helper.c
+ else \
+ PATH=$$PATH:$(EPATH) $(CC) -o $(ULTDSM) $(CPP_SSL) ultravnc_dsm_helper.c $(LD_SSL) -lssl -lcrypto; \
+ fi
+- PATH=$$PATH:$(EPATH) strip $(ULTDSM)
+ @ls -l $(ULTDSM)
+
+ test: $(CMD)
Index: ssvnc/tags/1.0.29-3/debian/copyright
===================================================================
--- ssvnc/tags/1.0.29-3/debian/copyright (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/copyright (revision 49)
@@ -0,0 +1,109 @@
+This package was debianized by Magnus Holmgren <holmgren@debian.org> on
+Fri, 31 Oct 2008 22:08:16 +0100.
+
+It was downloaded from <http://www.karlrunge.com/x11vnc/ssvnc.html>
+
+Upstream Author:
+
+ Karl J. Runge <runge@karlrunge.com>
+
+Copyright:
+
+ Copyright © 2006-2010 Karl J. Runge
+ TightVNC Copyright © 2001-2003 Constantin Kaplinsky
+ VNC Copyright © AT&T Laboratories Cambridge,
+ © 1994-2000 Olivetti Research Ltd/AT&T Laboratories Cambridge.
+
+License:
+
+ This package is free software; you can redistribute it and/or
+ modify it under the terms of version 2 of the GNU General Public
+ License as published by the Free Software Foundation.
+
+ This package 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 package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+
+Special GPL exception for ultravnc_dsm_helper:
+
+ In addition, as a special exception, Karl J. Runge gives permission
+ to link the code of its release of ultravnc_dsm_helper with the
+ OpenSSL project's "OpenSSL" library (or with modified versions of it
+ that use the same license as the "OpenSSL" library), and distribute
+ the linked executables. You must obey the GNU General Public License
+ in all respects for all of the code used other than "OpenSSL". If you
+ modify this file, you may extend this exception to your version of the
+ file, but you are not obligated to do so. If you do not wish to do
+ so, delete this exception statement from your version.
+
+
+ZYWRLE VNC codec © 2006 Hitachi Systems & Services, Ltd. (Noriaki
+Yamazaki, Research & Development Center)
+
+License:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - 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.
+
+ - Neither the name of the Hitachi Systems & Services, Ltd. nor the
+ names of its contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 FOUNDATION 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.
+
+
+SSVNC includes the Ultr@VNC 1.0.0 RC19 Java Viewer.
+
+Copyright:
+
+ © 2002-2005 Ultr@VNC Team. All Rights Reserved.
+ © 2004 Kenn Min Chong, John Witchel. All Rights Reserved.
+ © 2004 Alban Chazot. All Rights Reserved.
+ © 2001,2002 HorizonLive.com, Inc. All Rights Reserved.
+ © 2001,2002 Constantin Kaplinsky. All Rights Reserved.
+ © 1999 AT&T Laboratories Cambridge. All Rights Reserved.
+
+License:
+
+ This software is distributed under the GNU General Public Licence as
+ published by the Free Software Foundation. See the file LICENCE.TXT 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.
+
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2' instead.
+
+
+The Debian packaging is © 2008-2011, Magnus Holmgren
+<holmgren@debian.org> and is licensed under the GPL, see above.
Index: ssvnc/tags/1.0.29-3/debian/docs
===================================================================
--- ssvnc/tags/1.0.29-3/debian/docs (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/docs (revision 49)
@@ -0,0 +1,2 @@
+README
+README.src
Index: ssvnc/tags/1.0.29-3/debian/rules
===================================================================
--- ssvnc/tags/1.0.29-3/debian/rules (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/rules (revision 49)
@@ -0,0 +1,79 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DESTDIR=$(CURDIR)/debian/ssvnc
+
+export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+export CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ $(MAKE) config
+ touch configure-stamp
+
+build-indep:
+
+build-arch: build-stamp
+build-stamp: configure-stamp
+ dh_testdir
+
+ $(MAKE) all
+
+ touch $@
+
+build: build-arch build-indep
+
+clean: configure-stamp
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ $(MAKE) clean
+ rm vnc_unixsrc/*/Makefile
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep
+
+ $(MAKE) ROOT=$(DESTDIR) PREFIX=/usr MANDIR=share/man install
+ sed -ri -e 's#/bin/sh#/bin/bash#g' \
+ $(addprefix $(DESTDIR)/usr/lib/ssvnc/,ssvnc ssvnc_cmd util/ss_vncviewer util/ssvnc.tcl)
+
+# Build architecture-independent files here.
+binary-indep:
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -k ReleaseNotes
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_strip_nondeterminism
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build-indep build-arch build clean binary-indep binary-arch binary install configure
/ssvnc/tags/1.0.29-3/debian/rules
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: ssvnc/tags/1.0.29-3/debian/README.source
===================================================================
--- ssvnc/tags/1.0.29-3/debian/README.source (revision 0)
+++ ssvnc/tags/1.0.29-3/debian/README.source (revision 49)
@@ -0,0 +1,8 @@
+This package uses dpatch to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build. For basic usage
+information, see
+
+ /usr/share/doc/dpatch/README.source.gz
+
+(after installing dpatch).
Index: ssvnc/tags/1.0.29-3/debian
===================================================================
--- ssvnc/tags/1.0.29-3/debian (revision 0)
+++ ssvnc/tags/1.0.29-3/debian (revision 49)
/ssvnc/tags/1.0.29-3/debian
Property changes:
Added: mergeWithUpstream
## -0,0 +1 ##
+1
\ No newline at end of property