On 03/09/2011 07:58 AM, DRC wrote:
Committed as 4343, with modifications.  Please test.

Does not work right. If one of the checked arguments (SecurityTypes, rfbauth, etc.) is preceeded by an argument that is NOT processed by the vncserver script, but passed on to the Xvnc, the argument reading is off by 1.

E.g.:

vncserver -SecurityTypes none
works, but:
vncserver :1 -SecurityTypes none
fails.

Even so:
vncserver -fg -SecurityTypes none
works, and
vncserver :1 -AlwaysShared -SecurityTypes none
works as well

Problem is that the ARGV counter is increased when doing ++$i. Using $i+1 does not increase the loop counter, and leaves it up to the if-statements below if the added argument makes sense.

Now the patch, as attachment ;) Last time I have been on a mailing list, attachments were rejected (yes, it has been a long time since).

Sebastiaan


--- vncserver	2011-03-10 08:41:40.000000000 +0100
+++ /usr/bin/vncserver	2011-03-10 10:26:14.032313875 +0100
@@ -171,7 +171,7 @@
     # -SecurityTypes can be followed by a space or "="
     my @splitargs = split('=', $ARGV[$i]);
     if (@splitargs <= 1 && $i < @ARGV - 1) {
-        push(@splitargs, $ARGV[++$i]);
+        push(@splitargs, $ARGV[$i+1]);
     }
     if (lc(@splitargs[0]) eq "-securitytypes") {
         if (@splitargs > 1) {
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to