File: debian-changes-1.3.9-6.1.patch

package info (click to toggle)
tightvnc 1%3A1.3.10-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,508 kB
  • sloc: ansic: 209,589; asm: 780; perl: 539; makefile: 533; sh: 267
file content (526 lines) | stat: -rw-r--r-- 15,824 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
Description: Upstream changes introduced in version 1.3.9-6.1
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 tightvnc (1.3.9-6.1) unstable; urgency=low
 .
   * Non-maintainer upload.
     - Update to packaging format "3.0 (quilt)".
   * debian/compat
     - Update to 7.
   * debian/control
     - (Build-Depends): Update xutils to xutils-dev (important;
       Closes: #575865). Update to debhelper 7.1. Remove obsolete x-dev.
     - (Depends): Add ${misc:Depends}.
     - (Homepage): New field.
     - (Standards-Version): Update to 3.8.4.
     - (tightvncserver::Depends): Replace obsolete xbase-clients with
       x11-utils and xauth. The needed binaries xdpyinfo and xauth
       are used in Perl program /usr/bin/tightvncserver.
   * debian/copyright
     - Point to GPL-2.
   * debian/patches
     - (10, 20): Add new patches.
     - (30): Convert original MIPS patch to apply to current sources.
     - (tightvnc-ftbfs-mips.patch): Removed. See 30.
    * debian/*.{postrm,prerm}
     - Add "set -e".
     - Fix Lintian maintainer-script-without-set-e.
   * debian/rules
     - (CC): Add. Export variable for xmkmf(1).
     - (DH_COMPAT): Delete; use debian/compat.
     - (install): Correct tightvncpasswd.1x to tightvncpasswd.1.
     - (binary-arch): Remove empty directories.
   * debian/source/format
     - New file.
   * debian/watch
     - New file.
   * debian/tightvncserver.doc-base
     - New file.
   * debian/xtightvncviewer.menu
     - (section): Update obsolete Apps/Net to
       Applications/Network/Communication.
 .
 The person named in the Author field signed this changelog entry.
Bug-Debian: http://bugs.debian.org/575865
Forwarded: no
Author: Jari Aalto <jari.aalto@cante.net>
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Last-Update: 2021-05-15
--- a/vncserver.man
+++ b/vncserver.man
@@ -3,7 +3,7 @@
 .\" Man page for vncserver
 .\"
 .\" Copyright (C) 1998 Marcus.Brinkmann@ruhr-uni-bochum.de
-.\" Copyright (C) 2000, opal@debian.org
+.\" Copyright (C) 2000,2008 Ola Lundqvist <opal@debian.org>
 .\" Copyright (C) 2000, 2001 Red Hat, Inc.
 .\" Copyright (C) 2001, 2002 Constantin Kaplinsky
 .\"
@@ -18,9 +18,10 @@
 \fBvncserver\fR
 [:\fIdisplay\fR] [\-geometry \fIwidth\fRx\fIheight\fR] [\-depth \fIdepth\fR]
 [\-pixelformat rgb\fINNN\fR|bgr\fINNN\fR] [\-name \fIdesktop\-name\fR]
-[\fIXvnc\-options\fR...]
+[\| \-httpport\ int \|] [\| \-basehttpport\ int \|] [\| \-alwaysshared \|]
+[\| \-nevershared \|] [\fIXvnc\-options\fR...]
 .TP
-\fBvncserver\fR \-kill :\fIdisplay\fR
+\fBvncserver\fR [\| \-clean \|] \-kill :\fIdisplay\fR
 .TP
 \fBvncserver\fR \-help
 .SH DESCRIPTION
@@ -54,9 +55,27 @@
 \fB\-name\fR \fIstring\fR
 This specifies the name of the desktop.
 .TP
+\fB\-clean\fR
+This option can be used in conjunction with
+.TP
 \fB\-kill\fR \fB:\fR\fIdisplay\fR
 Stops the session running on the specified display.
 .TP
+\fB\-nevershared\fR
+Never allow shared desktops.
+.TP
+\fB\-alwaysshared\fR
+Always allow shared desktops.
+.TP
+\fB\-basehttpport int\fR
+The base http port to use for the java client applet (you have to install
+the tightvnc-java package to make this work). The real port number will be
+port = base + display num.
+.TP
+\fB\-httpport int\fR
+The http port to use for the java client applet (you have to install
+the tightvnc-java package to make this work).
+.TP
 \fB\-help\fR
 Prints a short usage notice to stderr.
 .SH EXAMPLES
--- a/vncserver
+++ b/vncserver
@@ -1,5 +1,6 @@
 #!/usr/bin/perl
 #
+#  Copyright (C) 2004-2006,2008-2009 Ola Lundqvist <opal@debian.org>
 #  Copyright (C) 2002-2009 Constantin Kaplinsky.  All Rights Reserved.
 #  Copyright (C) 1999 AT&T Laboratories Cambridge.  All Rights Reserved.
 #
@@ -23,6 +24,13 @@
 # vncserver - wrapper script to start an X VNC server.
 #
 
+# This file was heavily edited by
+#              Ola Lundqvist <opal@debian.org>
+#               Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
+# Clean option by Dirk Eddelbuettel <edd@debian.org>
+
+# Please report all errors to Debian and not to ORL.
+
 # First make sure we're operating in a sane environment.
 
 &SanityCheck();
@@ -32,9 +40,11 @@
 $geometry = "1024x768";
 $depth = 24;
 $desktopName = "X";
-$vncClasses = "/usr/local/vnc/classes";
+if (-d "/usr/share/tightvnc-java") {
+    $vncClasses = "/usr/share/tightvnc-java";
+}
 $vncUserDir = "$ENV{HOME}/.vnc";
-$fontPath = "unix/:7100";
+#$fontPath = "unix/:7100";
 $authType = "-rfbauth $vncUserDir/passwd";
 
 # Read configuration from the system-wide and user files if present.
@@ -50,14 +60,50 @@
     = ("#!/bin/sh\n\n".
        "xrdb \$HOME/.Xresources\n".
        "xsetroot -solid grey\n".
-       "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
-       "twm &\n");
+       "#x-terminal-emulator -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
+       "#x-window-manager &\n".
+       "# Fix to make GNOME work\n".
+       "export XKL_XMODMAP_DISABLE=1\n".
+       "/etc/X11/Xsession\n");
 
 $xauthorityFile = "$ENV{XAUTHORITY}";
 
+######## Adding configuration possibility ################
+$Config_file = "/etc/vnc.conf";
+&ReadConfigFile();
+$Config_file = "$ENV{HOME}/.vncrc";
+&ReadConfigFile();
+
+if (!$XFConfigPath) {
+  foreach ("/etc/X11/xorg.conf", "/etc/X11/XF86Config-4", "/etc/X11/XF86Config" ){
+      $XFConfigPath = $_;
+      last if ( -e $XFConfigPath );
+  }
+}
+if (!$fontPath) {
+  &ReadXFConfigFont;
+}
+if (!$fontPath) {
+  $fontPath = "/usr/share/fonts/X11/misc/,".
+              "/usr/share/fonts/X11/Type1/,".
+              "/usr/share/fonts/X11/75dpi/,".
+              "/usr/share/fonts/X11/100dpi/"
+}
+if (!$colorPath) {
+  &ReadXFConfigColor;
+}
+if (!$colorPath) {
+  foreach ("/etc/X11/rgb", "/usr/share/X11/rgb", "/usr/X11R6/lib/X11/rgb"){
+      $colorPath = $_;
+      last if ( -e "${colorPath}.txt" );
+  }
+}
+##########################################################
+
 $vncUserDirUnderTmp = ($vncUserDir =~ m|^/tmp/.+|) ? 1 : 0;
 $xstartup = ($vncUserDirUnderTmp) ?
   "$ENV{HOME}/.vncstartup" : "$vncUserDir/xstartup";
+$xstartup = $vncStartup if ($vncStartup);
 unless ($xauthorityFile) {
     if ($vncUserDirUnderTmp) {
         $xauthorityFile = "$vncUserDir/.Xauthority";
@@ -72,12 +118,23 @@
 # Check command line options
 
 &ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,
-	      "-help",0,"-h",0,"--help",0);
+	      "-help",0,"-h",0,"--help",0,
+	      "-clean",0, "-fp",1,
+              "-alwaysshared",0, "-nevershared",0,
+              "-httpport",1,"-basehttpport",1);
 
 &Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});
 
 &Kill() if ($opt{'-kill'});
 
+$useClasses = 0;
+if (defined $vncClasses) {
+  if(! -d $vncClasses) {
+    die "VNC class files can not be found at $vncClasses.";
+  }
+  $useClasses = 1;
+}
+
 # Uncomment this line if you want default geometry, depth and pixelformat
 # to match the current X display:
 # &GetXDisplayDefaults();
@@ -93,6 +150,25 @@
     $pixelformat = $opt{'-pixelformat'};
 }
 
+if ($opt{'-fp'}) {
+    @fontPathElements = split(/\s*,\s*/, "$opt{'-fp'}");
+
+    $fontPath = '';
+
+    foreach $i (0.."$#fontPathElements") {
+        $tempFontPath = $fontPathElements[$i];
+        if ($tempFontPath !~ m!^[^/]*/[^/]*:\d+$!) {
+            $tempFontPath =~ s/:unscaled$//;
+            if (-r "$tempFontPath/fonts.dir") {
+                $fontPath .= "$fontPathElements[$i],";
+            }
+        } else {
+            $fontPath .= "$fontPathElements[$i],";
+        }
+    }
+    chop $fontPath;
+}
+
 &CheckGeometryAndDepth();
 
 if ($opt{'-name'}) {
@@ -106,14 +182,14 @@
         die "$prog: Could not create $vncUserDir.\n";
     }
 }
-($z,$z,$mode) = lstat("$vncUserDir");
+($z,$z,$mode) = stat("$vncUserDir");
 if (!-d _ || !-o _ || ($vncUserDirUnderTmp && ($mode & 0777) != 0700)) {
     die "$prog: Wrong type or access mode of $vncUserDir.\n";
 }
 
 # Make sure the user has a password.
 
-($z,$z,$mode) = lstat("$vncUserDir/passwd");
+($z,$z,$mode) = stat("$vncUserDir/passwd");
 if (-e _ && (!-f _ || !-o _)) {
     die "$prog: Wrong type or ownership on $vncUserDir/passwd.\n";
 }
@@ -159,9 +235,21 @@
 
 # Now start the X VNC Server
 
-$cmd = "Xvnc :$displayNumber";
+$cmd = "Xtightvnc :$displayNumber";
 $cmd .= " -desktop " . &quotedString($desktopName);
-$cmd .= " -httpd $vncClasses";
+if ($useClasses) {
+  $cmd .= " -httpd $vncClasses";
+  print ("Found $vncClasses for http connections.\n");
+  if ($opt{'-httpport'}) {
+    $cmd .= " -httpport $opt{'-httpport'}";
+    print ("Listening to $opt{'-httpport'} for http connections.\n");
+  }
+  elsif ($opt{'-basehttpport'}) {
+    my $v = $opt{'-basehttpport'} + $displayNumber;
+    print ("Listening to $v for http connections.\n");
+    $cmd .= " -httpport $v";
+  }
+}
 $cmd .= " -auth $xauthorityFile";
 $cmd .= " -geometry $geometry" if ($geometry);
 $cmd .= " -depth $depth" if ($depth);
@@ -171,6 +259,8 @@
 $cmd .= " -rfbport $vncPort";
 $cmd .= " -fp $fontPath" if ($fontPath);
 $cmd .= " -co $colorPath" if ($colorPath);
+$cmd .= " -alwaysshared" if ($opt{'-alwaysshared'});
+$cmd .= " -nevershared" if ($opt{'-nevershared'});
 
 foreach $arg (@ARGV) {
     $cmd .= " " . &quotedString($arg);
@@ -182,18 +272,18 @@
 $pidFile = "$vncUserDir/$host:$displayNumber.pid";
 system("$cmd & echo \$! >$pidFile");
 
-# Give Xvnc a chance to start up
+# Give Xtightvnc a chance to start up
 
 sleep(1);
 unless (kill 0, `cat $pidFile`) {
-    warn "Couldn't start Xvnc; trying default font path.\n";
+    warn "Couldn't start Xtightvnc; trying default font path.\n";
     warn "Please set correct fontPath in the $prog script.\n";
     $cmd =~ s@-fp [^ ]+@@;
     system("$cmd & echo \$! >$pidFile");
     sleep(1);
 }
 unless (kill 0, `cat $pidFile`) {
-    warn "Couldn't start Xvnc process.\n\n";
+    warn "Couldn't start Xtightvnc process.\n\n";
     open(LOG, "<$desktopLog");
     while (<LOG>) { print; }
     close(LOG);
@@ -231,6 +321,65 @@
 
 exit;
 
+############################ Debian functions #################################
+# I thank Manoj for the code below.
+#
+# ReadConfigFile reads in a config file and sets variables according to it.
+#
+
+sub ReadConfigFile
+{
+  open(CONFIG, "$Config_file") || return;
+  my $lineno = 0;
+  while (<CONFIG>) {
+      chomp;
+      $lineno++;
+      s/\#.*//og;
+      next if /^\s*$/og;
+      $_ .= ";" unless /;\s*$/;
+      if (/^\s*([^=]+)\s*=\s*(\S.*)$/o) {
+          my $ret = eval "$1=$2";
+          if ($@) {
+              print STDERR "Error parsing config file $Config_file!\n";
+              print STDERR "$lineno:$_\n";
+          }
+      }
+  }
+}
+
+sub ReadXFConfigFont
+{
+  open(CONFIG, "$XFConfigPath") || return;
+  my $lineno = 0;
+  while (<CONFIG>) {
+      chomp;
+      $lineno++;
+      s/\#.*//og;
+      next if /^\s*$/og;
+      if (/^\s*FontPath\s*"(\S.*)"\s*$/o) {
+          $fontPath .= "," if $fontPath;
+          $fontPath .= $1;
+      }
+  }
+}
+
+sub ReadXFConfigColor
+{
+  open(CONFIG, "$XFConfigPath") || return;
+  my $lineno = 0;
+  while (<CONFIG> && !$colorPath) {
+      chomp;
+      $lineno++;
+      s/\#.*//og;
+      next if /^\s*$/og;
+      if (/^\s*RgbPath\s*"(\S.*)"\s*$/o) {
+          $colorPath = $1;
+      }
+  }
+}
+
+
+########## End of debian functions ###########
 
 ###############################################################################
 #
@@ -296,7 +445,8 @@
 
     socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
     eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
-    unless (bind(S, pack('S n x12', $AF_INET, 6000 + $n))) {
+    #unless (bind(S, pack('S n x12', $AF_INET, 6000 + $n))) {
+    unless (bind(S, sockaddr_in(6000 + $n, &INADDR_ANY))) {
 	close(S);
 	return 0;
     }
@@ -304,7 +454,8 @@
 
     socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
     eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
-    unless (bind(S, pack('S n x12', $AF_INET, 5900 + $n))) {
+    #unless (bind(S, pack('S n x12', $AF_INET, 5900 + $n))) {
+    unless (bind(S, sockaddr_in(5900 + $n, &INADDR_ANY))) {
 	close(S);
 	return 0;
     }
@@ -442,15 +593,19 @@
 	"Usage: $prog [<OPTIONS>] [:<DISPLAY#>]\n".
 	"       $prog -kill :<DISPLAY#>\n".
 	"\n".
-	"<OPTIONS> are Xvnc options, or:\n".
+	"<OPTIONS> are Xtightvnc options, or:\n".
 	"\n".
 	"        -name <DESKTOP-NAME>\n".
 	"        -depth <DEPTH>\n".
 	"        -geometry <WIDTH>x<HEIGHT>\n".
+        "        -httpport number\n".
+        "        -basehttpport number\n".
+        "        -alwaysshared\n".
+        "        -nevershared\n".
 	"        -pixelformat rgb<NNN>\n".
 	"        -pixelformat bgr<NNN>\n".
 	"\n".
-	"See vncserver and Xvnc manual pages for more information.\n");
+	"See vncserver and Xtightvnc manual pages for more information.\n");
 }
 
 
@@ -474,14 +629,18 @@
 
     unless (-r $pidFile) {
 	die "\nCan't find file $pidFile\n".
-	    "You'll have to kill the Xvnc process manually\n\n";
+	    "You'll have to kill the Xtightvnc process manually\n\n";
     }
 
     $SIG{'HUP'} = 'IGNORE';
     chop($pid = `cat $pidFile`);
-    warn "Killing Xvnc process ID $pid\n";
+    warn "Killing Xtightvnc process ID $pid\n";
     system("kill $pid");
     unlink $pidFile;
+
+    ## If option -clean is given, also remove the logfile
+    unlink "$vncUserDir/$host$opt{'-kill'}.log" if ($opt{'-clean'});
+
     exit;
 }
 
@@ -549,7 +708,7 @@
     #
 
  cmd:
-    foreach $cmd ("uname","xauth","Xvnc","vncpasswd") {
+    foreach $cmd ("uname","xauth","Xtightvnc","vncpasswd") {
 	for (split(/:/,$ENV{PATH})) {
 	    if (-x "$_/$cmd") {
 		next cmd;
--- a/Xvnc/programs/Xserver/Xvnc.man
+++ b/Xvnc/programs/Xserver/Xvnc.man
@@ -141,7 +141,7 @@
 allow only loopback connections from the server machine (the
 \fI\-localhost\fR option) and to use SSH tunneling for remote access
 to the Xvnc server. For details on SSH tunneling, see
-<URL:http://www.uk.research.att.com/vnc/sshvnc.html> .
+<URL:http://www.cl.cam.ac.uk/Research/DTG/attarchive/vnc/sshvnc.html> .
 .SH SEE ALSO
 \fBvncserver\fR(1), \fBvncviewer\fR(1), \fBvncpasswd\fR(1),
 \fBvncconnect\fR(1), \fBsshd\fR(1)
--- a/Xvnc/programs/Xserver/Xserver.man
+++ b/Xvnc/programs/Xserver/Xserver.man
@@ -649,7 +649,7 @@
 /tmp/rcX\fBn\fP
 Kerberos 5 replay cache for display number \fBn\fP
 .TP 30
-/usr/adm/X\fBn\fPmsgs
+/var/log/X\fBn\fPmsgs
 Error log file for display number \fBn\fP if run from \fIinit(8)\fP
 .TP 30
 <XRoot>/lib/X11/xdm/xdm-errors
--- a/Xvnc/programs/Xserver/os/osinit.c
+++ b/Xvnc/programs/Xserver/os/osinit.c
@@ -71,7 +71,7 @@
 #endif
 
 #ifndef ADMPATH
-#define ADMPATH "/usr/adm/X%smsgs"
+#define ADMPATH "/var/log/X%smsgs"
 #endif
 
 extern char *display;
--- a/Xvnc/programs/Xserver/include/servermd.h
+++ b/Xvnc/programs/Xserver/include/servermd.h
@@ -421,6 +421,20 @@
 
 #endif /* Linux/PPC */
 
+#if defined (linux) && defined(__sparc__)
+
+#define IMAGE_BYTE_ORDER       MSBFirst
+#define BITMAP_BIT_ORDER       MSBFirst
+#define GLYPHPADBYTES          4
+#define GETLEFTBITS_ALIGNMENT  1
+
+#define AVOID_MEMORY_READ
+#define LARGE_INSTRUCTION_CACHE
+#define FAST_CONSTANT_OFFSET_MODE
+#define SHARED_IDCACHE
+
+#endif /* Linux/sparc */
+
 #if defined(__MACH__) && defined(__POWERPC__)
 
 #define IMAGE_BYTE_ORDER       MSBFirst
--- a/Xvnc/programs/Xserver/dix/dixfonts.c
+++ b/Xvnc/programs/Xserver/dix/dixfonts.c
@@ -1759,10 +1759,11 @@
 	    if (err != Successful) {
 		xfree(fpe->name);
 		xfree(fpe);
-		err = BadValue;
-		goto bail;
+		err = Successful;
 	    }
-	    fplist[valid_paths++] = fpe;
+	    else {
+	      fplist[valid_paths++] = fpe;
+            }
 	} else {
 	    err = BadValue;
 	    goto bail;