diff options
author | runge <runge> | 2008-09-14 19:28:25 +0000 |
---|---|---|
committer | runge <runge> | 2008-09-14 19:28:25 +0000 |
commit | 95d7788eb062a6c6ba07bee516e4e8f1cc8a4db4 (patch) | |
tree | 37da2bfec58413d02c9fbe59f86e848bf0fec348 /classes | |
parent | d5cba7a574a667f5321194cb05d0b4adcb995866 (diff) | |
download | libtdevnc-95d7788eb062a6c6ba07bee516e4e8f1cc8a4db4.tar.gz libtdevnc-95d7788eb062a6c6ba07bee516e4e8f1cc8a4db4.zip |
x11vnc: -sleepin m-n for random sleep. More mktemp and mkstemp
protections. SSL_INIT_TIMEOUT=n env. var. Fix macosx console
X call bug. Synchronize other projects sources.
Diffstat (limited to 'classes')
-rw-r--r-- | classes/ssl/SignedUltraViewerSSL.jar | bin | 101978 -> 102060 bytes | |||
-rw-r--r-- | classes/ssl/SignedVncViewer.jar | bin | 79618 -> 79618 bytes | |||
-rw-r--r-- | classes/ssl/UltraViewerSSL.jar | bin | 99094 -> 99179 bytes | |||
-rw-r--r-- | classes/ssl/VncViewer.jar | bin | 76830 -> 76830 bytes | |||
-rwxr-xr-x | classes/ssl/ss_vncviewer | 123 | ||||
-rw-r--r-- | classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch | 101 |
6 files changed, 165 insertions, 59 deletions
diff --git a/classes/ssl/SignedUltraViewerSSL.jar b/classes/ssl/SignedUltraViewerSSL.jar Binary files differindex 33d35a6..d7d3405 100644 --- a/classes/ssl/SignedUltraViewerSSL.jar +++ b/classes/ssl/SignedUltraViewerSSL.jar diff --git a/classes/ssl/SignedVncViewer.jar b/classes/ssl/SignedVncViewer.jar Binary files differindex bdb2d8f..d1cb6db 100644 --- a/classes/ssl/SignedVncViewer.jar +++ b/classes/ssl/SignedVncViewer.jar diff --git a/classes/ssl/UltraViewerSSL.jar b/classes/ssl/UltraViewerSSL.jar Binary files differindex b31d41a..6081788 100644 --- a/classes/ssl/UltraViewerSSL.jar +++ b/classes/ssl/UltraViewerSSL.jar diff --git a/classes/ssl/VncViewer.jar b/classes/ssl/VncViewer.jar Binary files differindex 599fc17..e070806 100644 --- a/classes/ssl/VncViewer.jar +++ b/classes/ssl/VncViewer.jar diff --git a/classes/ssl/ss_vncviewer b/classes/ssl/ss_vncviewer index d12f5ce..9b456b2 100755 --- a/classes/ssl/ss_vncviewer +++ b/classes/ssl/ss_vncviewer @@ -39,7 +39,8 @@ # and then a 2nd CONNECT to the destination VNC server.) # # Use socks://host:port, socks4://host:port, or socks5://host,port -# to force usage of a SOCKS proxy. Also repeater://host:port. +# to force usage of a SOCKS proxy. Also repeater://host:port and +# sslrepeater://host:port. # # -showcert Only fetch the certificate using the 'openssl s_client' # command (openssl(1) must in installed). @@ -284,6 +285,19 @@ fi orig="$1" shift +# set up special case of ultravnc single click III mode: +if echo "$proxy" | egrep "^sslrepeater://" > /dev/null; then + pstr=`echo "$proxy" | sed -e 's,sslrepeater://,,'` + pstr1=`echo "$pstr" | sed -e 's/+.*$//'` + pstr2=`echo "$pstr" | sed -e 's/^[^+]*+//'` + SSVNC_REPEATER="SCIII=$pstr2"; export SSVNC_REPEATER + orig=$pstr1 + echo + echo "reset: SSVNC_REPEATER=$SSVNC_REPEATER orig=$orig proxy=''" + proxy="" +fi + + # check -ssh and -mycert/-verify conflict: if [ "X$use_ssh" = "X1" -a "X$use_sshssl" = "X" ]; then if [ "X$mycert" != "X" -o "X$verify" != "X" ]; then @@ -322,6 +336,14 @@ elif echo "$orig" | grep '^vnc+ssh://' > /dev/null; then use_ssh=1 fi +if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then + verify="" + mycert="" + use_ssh="" + use_sshssl="" + direct_connect=1 +fi + # (possibly) tell the vncviewer to only listen on lo: if [ "X$reverse" != "X" -a "X$direct_connect" = "X" ]; then VNCVIEWER_LISTEN_LOCALHOST=1 @@ -472,6 +494,14 @@ final() { kill -KILL "$stunnel_pid" 2>/dev/null stunnel_pid="" fi + if [ "X$dsm_pid" != "X" ]; then + echo "Terminating background ultravnc_dsm_helper process" + echo kill -TERM "$dsm_pid" + kill -TERM "$dsm_pid" 2>/dev/null + sleep 1 + kill -KILL "$dsm_pid" 2>/dev/null + stunnel_pid="" + fi if [ "X$tail_pid" != "X" ]; then kill -TERM $tail_pid fi @@ -517,6 +547,19 @@ fi # a portable, but not absolutely safe, tmp file creator mytmp() { tf=$1 + if type mktemp > /dev/null 2>&1; then + # if we have mktemp(1), use it: + tf2="$tf.XXXXXX" + tf2=`mktemp "$tf2"` + if [ "X$tf2" != "X" -a -f "$tf2" ]; then + if [ "X$DEBUG_MKTEMP" != "X" ]; then + echo "mytmp-mktemp: $tf2" 1>&2 + fi + echo "$tf2" + return + fi + fi + # fallback to multiple cmds: rm -rf "$tf" || exit 1 if [ -d "$tf" ]; then echo "tmp file $tf still exists as a directory." @@ -531,6 +574,10 @@ mytmp() { touch "$tf" || exit 1 chmod 600 "$tf" || exit 1 rchk + if [ "X$DEBUG_MKTEMP" != "X" ]; then + echo "mytmp-touch: $tf" 1>&2 + fi + echo "$tf" } # trick for the undocumented rsh://host:port method. @@ -1099,8 +1146,8 @@ Kecho sproxy1_host=$sproxy1_host Kecho sproxy1_port=$sproxy1_port Kecho sproxy1_user=$sproxy1_user - ptmp="/tmp/ss_vncviewer${RANDOM}.$$.pl" - mytmp "$ptmp" + ptmp="/tmp/ss_vncviewer_ssh${RANDOM}.$$.pl" + ptmp=`mytmp "$ptmp"` PPROXY_REMOVE=1; export PPROXY_REMOVE proxy=$pproxy port_save=$port @@ -1241,8 +1288,8 @@ Kecho proxy=$proxy rc=$? elif [ "X$getport" != "X" ]; then - tport=/tmp/tport${RANDOM}.$$ - mytmp $tport + tport=/tmp/ss_vncviewer_tport${RANDOM}.$$ + tport=`mytmp "$tport"` if [ "X$rsh" != "X1" ]; then if echo "$ssh_cmd" | grep -w sudo > /dev/null; then @@ -1441,7 +1488,7 @@ fi ptmp="" if [ "X$proxy" != "X" ]; then ptmp="/tmp/ss_vncviewer${RANDOM}.$$.pl" - mytmp "$ptmp" + ptmp=`mytmp "$ptmp"` PPROXY_REMOVE=1; export PPROXY_REMOVE pcode "$ptmp" if [ "X$showcert" != "X1" -a "X$direct_connect" = "X" ]; then @@ -1484,7 +1531,14 @@ if [ "X$showcert" = "X1" ]; then fi if [ "X$direct_connect" != "X" ]; then - if [ "X$getport" = "X" ]; then + if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then + SSVNC_NO_ENC_WARN=1 + echo "" + echo "Using UltraVNC DSM Plugin key for encryption:" + echo "" + echo " $SSVNC_ULTRA_DSM PORT HOST:PORT" + echo "" + elif [ "X$getport" = "X" ]; then echo "" echo "Running viewer for direct connection:" echo "" @@ -1508,9 +1562,22 @@ if [ "X$direct_connect" != "X" ]; then fi echo "" if [ "X$ptmp" != "X" ]; then - PPROXY_LISTEN=$use - export PPROXY_LISTEN + if [ "X$reverse" = "X" ]; then + PPROXY_LISTEN=$use + export PPROXY_LISTEN + else + PPROXY_REVERSE="localhost:$use" + export PPROXY_REVERSE + pps=3 + if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then + pps=`expr $pps + $SSVNC_EXTRA_SLEEP` + fi + PPROXY_SLEEP=$pps; export PPROXY_SLEEP; + PPROXY_KILLPID=+1; export PPROXY_KILLPID; + fi + $ptmp & + if [ "X$reverse" = "X" ]; then #sleep 2 #echo T sleep 1 @@ -1518,29 +1585,52 @@ if [ "X$direct_connect" != "X" ]; then fi host="localhost" disp="$N" + port=`expr $disp + 5900` fi if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then echo "T sleep $SSVNC_EXTRA_SLEEP" sleep $SSVNC_EXTRA_SLEEP fi if [ "X$reverse" = "X" ]; then - echo "$VNCVIEWERCMD" "$@" $host:$disp + hostdisp="$host:$disp" + if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then + hostdisp="exec=$SSVNC_ULTRA_DSM 0 $host:$port" + fi + echo "$VNCVIEWERCMD" "$@" "$hostdisp" trap "final" 0 2 15 echo "" - $VNCVIEWERCMD "$@" $host:$disp + $VNCVIEWERCMD "$@" "$hostdisp" if [ $? != 0 ]; then echo "vncviewer command failed: $?" if [ "X$secondtry" = "X1" ]; then sleep 2 - $VNCVIEWERCMD "$@" $host:$disp + $VNCVIEWERCMD "$@" "$hostdisp" fi fi else echo "" echo "NOTE: Press Ctrl-C to terminate viewer LISTEN mode." echo "" - echo "$VNCVIEWERCMD" "$@" -listen $disp trap "final" 0 2 15 + if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then + echo "NOTE: The ultravnc_dsm_helper only runs once. So after the first LISTEN" + echo " ends, you will have to Press Ctrl-C and restart for a new connection." + echo "" + dport=`expr 5500 + $disp` + cmd="$SSVNC_ULTRA_DSM $dport localhost:$use" + echo "Running:" + echo + echo "$cmd &" + echo + $cmd & + dsm_pid=$! + sleep 2 + disp=$use + if [ $disp -ge 5500 ]; then + disp=`expr $disp - 5500` + fi + fi + echo "$VNCVIEWERCMD" "$@" -listen $disp echo "" $VNCVIEWERCMD "$@" -listen $disp fi @@ -1548,12 +1638,13 @@ if [ "X$direct_connect" != "X" ]; then fi tmp_cfg=/tmp/ss_vncviewer${RANDOM}.$$ -mytmp "$tmp_cfg" +tmp_cfg=`mytmp "$tmp_cfg"` # make_tcert is no longer invoked via the ssvnc gui (Listen mode). # make_tcert is for testing only now via -mycert BUILTIN make_tcert() { - tcert="/tmp/tcert${RANDOM}.$$" + tcert="/tmp/ss_vnc_viewer_tcert${RANDOM}.$$" + tcert=`mytmp "$tcert"` cat > $tcert <<END -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAvkfXxb0wcxgrjV2ziFikjII+ze8iKcTBt47L0GM/c21efelN @@ -1617,7 +1708,7 @@ fi if [ "X$reverse" = "X" ]; then - if echo "$proxy" | grep repeater:// > /dev/null; then + if echo "$proxy" | grep "^repeater://" > /dev/null; then if [ "X$cert" = "XBUILTIN" ]; then ttcert=`make_tcert` cert="cert = $ttcert" diff --git a/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch b/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch index c463916..b2ba9c5 100644 --- a/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch +++ b/classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch @@ -121,7 +121,7 @@ diff -Naur JavaViewer.orig/ButtonPanel.java JavaViewer/ButtonPanel.java } diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java --- JavaViewer.orig/FTPFrame.java 2005-03-15 23:53:14.000000000 -0500 -+++ JavaViewer/FTPFrame.java 2008-08-31 14:46:16.000000000 -0400 ++++ JavaViewer/FTPFrame.java 2008-09-07 21:12:11.000000000 -0400 @@ -24,8 +24,13 @@ import java.io.*; import java.util.ArrayList; @@ -283,11 +283,11 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java + } + } + } else { -+ if (C_drive > 0) { ++ if (C_drive >= 0) { + remoteDrivesComboBox.setSelectedIndex(C_drive); bFound = true; +System.out.println("ComboBox: C_drive index: " + C_drive); -+ } else if (O_drive > 0) { ++ } else if (O_drive >= 0) { + remoteDrivesComboBox.setSelectedIndex(O_drive); + bFound = true; +System.out.println("ComboBox: Other_drive index: " + O_drive); @@ -1593,7 +1593,7 @@ diff -Naur JavaViewer.orig/OptionsFrame.java JavaViewer/OptionsFrame.java choices[shareDesktopIndex].select("Yes"); diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java --- JavaViewer.orig/RfbProto.java 2006-05-24 15:14:40.000000000 -0400 -+++ JavaViewer/RfbProto.java 2008-09-06 21:36:14.000000000 -0400 ++++ JavaViewer/RfbProto.java 2008-09-14 10:50:33.000000000 -0400 @@ -31,6 +31,7 @@ import java.net.Socket; import java.util.*; @@ -1738,7 +1738,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java if (contentParam == rfbADrivesList) { readFTPMsgDriveList(); -@@ -688,11 +737,11 @@ +@@ -688,21 +737,31 @@ // Internally used. Write an Rfb message to the server void writeRfbFileTransferMsg( @@ -1755,7 +1755,16 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java { byte b[] = new byte[12]; -@@ -702,7 +751,10 @@ ++ if (viewer.dsmActive) { ++ // need to send the rfbFileTransfer msg type twice for the plugin... ++ byte b2[] = new byte[1]; ++ b2[0] = (byte) rfbFileTransfer; ++ os.write(b2); ++ } ++ + b[0] = (byte) rfbFileTransfer; + b[1] = (byte) contentType; + b[2] = (byte) contentParam; byte by = 0; long c = 0; @@ -1767,7 +1776,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java c = size & 0xFF000000; by = (byte) (c >>> 24); b[4] = by; -@@ -729,6 +781,8 @@ +@@ -729,6 +788,8 @@ by = (byte) c; b[11] = by; os.write(b); @@ -1776,7 +1785,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java if (text != null) -@@ -746,12 +800,12 @@ +@@ -746,12 +807,12 @@ //Internally used. Write an rfb message to the server for sending files ONLY int writeRfbFileTransferMsgForSendFile( @@ -1795,7 +1804,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java { File f = new File(source); fis = new FileInputStream(f); -@@ -768,50 +822,47 @@ +@@ -768,50 +829,47 @@ while (bytesRead!=-1) { @@ -1887,7 +1896,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } writeRfbFileTransferMsg(fError ? rfbAbortFileTransfer : rfbEndOfFile, 0, 0, 0, null); -@@ -831,24 +882,30 @@ +@@ -831,24 +889,30 @@ { System.out.print((char) is.readUnsignedByte()); } @@ -1926,7 +1935,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } viewer.ftp.historyComboBox.setSelectedIndex(0); viewer.ftp.enableButtons(); -@@ -907,7 +964,7 @@ +@@ -907,7 +971,7 @@ //Handles acknowledgement that the file has been deleted on the server void deleteRemoteFileFeedback() throws IOException { @@ -1935,7 +1944,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java int length = is.readInt(); String f = ""; for (int i = 0; i < length; i++) -@@ -916,7 +973,11 @@ +@@ -916,7 +980,11 @@ } viewer.ftp.refreshRemoteLocation(); @@ -1948,7 +1957,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java viewer.ftp.historyComboBox.setSelectedIndex(0); } -@@ -926,12 +987,7 @@ +@@ -926,12 +994,7 @@ try { String temp = text; @@ -1962,7 +1971,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } catch (IOException e) { -@@ -943,7 +999,7 @@ +@@ -943,7 +1006,7 @@ // Handles acknowledgement that the directory has been created on the server void createRemoteDirectoryFeedback() throws IOException { @@ -1971,7 +1980,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java int length = is.readInt(); String f=""; for (int i = 0; i < length; i++) -@@ -951,7 +1007,11 @@ +@@ -951,7 +1014,11 @@ f += (char)is.readUnsignedByte(); } viewer.ftp.refreshRemoteLocation(); @@ -1984,7 +1993,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java viewer.ftp.historyComboBox.setSelectedIndex(0); } -@@ -961,12 +1021,7 @@ +@@ -961,12 +1028,7 @@ try { String temp = text; @@ -1998,7 +2007,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } catch (IOException e) { -@@ -979,15 +1034,13 @@ +@@ -979,15 +1041,13 @@ { try { @@ -2018,7 +2027,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } catch (IOException e) { -@@ -1004,6 +1057,9 @@ +@@ -1004,6 +1064,9 @@ viewer.ftp.disableButtons(); int size = is.readInt(); int length = is.readInt(); @@ -2028,7 +2037,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java String tempName = ""; for (int i = 0; i < length; i++) -@@ -1011,6 +1067,15 @@ +@@ -1011,6 +1074,15 @@ tempName += (char) is.readUnsignedByte(); } @@ -2044,7 +2053,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java // sf@2004 - Read the high part of file size (not yet in rfbFileTransferMsg for // backward compatibility reasons...) int sizeH = is.readInt(); -@@ -1021,7 +1086,16 @@ +@@ -1021,7 +1093,16 @@ fileSize=0; fileChunkCounter = 0; String fileName = receivePath; @@ -2062,7 +2071,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java writeRfbFileTransferMsg(rfbFileHeader, 0, 0, 0, null); } -@@ -1085,7 +1159,13 @@ +@@ -1085,7 +1166,13 @@ fAbort = false; fFileReceptionError = true; writeRfbFileTransferMsg(rfbAbortFileTransfer, 0, 0, 0, null); @@ -2077,7 +2086,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } // sf@2004 - For old FT protocole only /* -@@ -1104,7 +1184,7 @@ +@@ -1104,7 +1191,7 @@ int length = is.readInt(); fileSize=0; fos.close(); @@ -2086,7 +2095,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java viewer.ftp.refreshLocalLocation(); if (fReceptionOk && !fFileReceptionError) { -@@ -1132,12 +1212,7 @@ +@@ -1132,12 +1219,7 @@ try { String temp = text; @@ -2100,7 +2109,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } catch (IOException e) { -@@ -1197,11 +1272,80 @@ +@@ -1197,11 +1279,80 @@ str += temp; } } @@ -2181,7 +2190,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java //Internally used to receive directory content from server //Here, the server sends one file/directory with it's attributes void readFTPMsgDirectoryListContent() throws IOException -@@ -1217,17 +1361,25 @@ +@@ -1217,17 +1368,25 @@ dwReserved0, dwReserved1; long ftCreationTime, ftLastAccessTime, ftLastWriteTime; @@ -2210,7 +2219,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java length -= 8; nFileSizeHigh = is.readInt(); length -= 4; -@@ -1253,7 +1405,9 @@ +@@ -1253,7 +1412,9 @@ cAlternateFileName = (char) is.readUnsignedByte(); length--; } @@ -2221,7 +2230,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java || dwFileAttributes == 369098752 || dwFileAttributes == 285212672 || dwFileAttributes == 271056896 -@@ -1263,11 +1417,74 @@ +@@ -1263,11 +1424,74 @@ || dwFileAttributes == 369623040) { fileName = " [" + fileName + "]"; @@ -2301,7 +2310,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } // a.add(fileName); -@@ -1282,14 +1499,31 @@ +@@ -1282,14 +1506,31 @@ // sf@2004 a.clear(); @@ -2336,7 +2345,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } //Internally used to signify the drive requested is not ready -@@ -1299,6 +1533,8 @@ +@@ -1299,6 +1540,8 @@ System.out.println("Remote Drive unavailable"); viewer.ftp.connectionStatus.setText(" > WARNING - Remote Drive unavailable (possibly restricted access or media not present)"); viewer.ftp.remoteStatus.setText("WARNING: Remote Drive unavailable"); @@ -2345,7 +2354,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } //Call this method to request the list of drives on the server. -@@ -1306,12 +1542,11 @@ +@@ -1306,12 +1549,11 @@ { try { @@ -2363,7 +2372,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java } catch (IOException e) { -@@ -1355,21 +1590,21 @@ +@@ -1355,21 +1597,21 @@ int h, boolean incremental) throws IOException { @@ -3983,7 +3992,7 @@ diff -Naur JavaViewer.orig/VncCanvas.java JavaViewer/VncCanvas.java result = 0; // Transparent pixel diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java --- JavaViewer.orig/VncViewer.java 2006-05-24 15:14:40.000000000 -0400 -+++ JavaViewer/VncViewer.java 2008-08-27 10:46:27.000000000 -0400 ++++ JavaViewer/VncViewer.java 2008-09-14 10:36:37.000000000 -0400 @@ -80,11 +80,11 @@ GridBagLayout gridbag; ButtonPanel buttonPanel; @@ -4007,7 +4016,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java String passwordParam; String encPasswordParam; boolean showControls; -@@ -115,28 +115,66 @@ +@@ -115,28 +115,67 @@ int i; // mslogon support 2 end @@ -4027,6 +4036,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java +boolean delayAuthPanel; +boolean ftpOnly; +boolean graftFtp; ++boolean dsmActive; + +boolean gotAuth; +int authGot; @@ -4080,7 +4090,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java // authenticator = new AuthPanel(false); // mslogon support : go to connectAndAuthenticate() if (RecordingFrame.checkSecurity()) rec = new RecordingFrame(this); -@@ -147,10 +185,11 @@ +@@ -147,10 +186,11 @@ cursorUpdatesDef = null; eightBitColorsDef = null; @@ -4094,7 +4104,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java rfbThread = new Thread(this); rfbThread.start(); } -@@ -186,6 +225,30 @@ +@@ -186,6 +226,30 @@ gbc.weightx = 1.0; gbc.weighty = 1.0; @@ -4125,7 +4135,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java // Add ScrollPanel to applet mode // Create a panel which itself is resizeable and can hold -@@ -286,6 +349,24 @@ +@@ -286,6 +350,24 @@ void connectAndAuthenticate() throws Exception { @@ -4150,7 +4160,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java // If "ENCPASSWORD" parameter is set, decrypt the password into // the passwordParam string. -@@ -336,7 +417,22 @@ +@@ -336,7 +418,22 @@ // @@ -4174,7 +4184,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java authenticator = new AuthPanel(mslogon); -@@ -390,6 +486,10 @@ +@@ -390,6 +487,10 @@ break; //mslogon support end @@ -4185,7 +4195,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java // Retry on authentication failure. authenticator.retry(); } -@@ -405,9 +505,11 @@ +@@ -405,9 +506,11 @@ void prologueDetectAuthProtocol() throws Exception { @@ -4199,7 +4209,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java System.out.println("RFB server supports protocol version " + rfb.serverMajor + "." + rfb.serverMinor); -@@ -431,16 +533,36 @@ +@@ -431,16 +534,36 @@ boolean tryAuthenticate(String us, String pw) throws Exception { @@ -4242,7 +4252,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java switch (authScheme) { -@@ -629,6 +751,10 @@ +@@ -629,6 +752,10 @@ void doProtocolInitialisation() throws IOException { @@ -4253,7 +4263,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java rfb.writeClientInit(); rfb.readServerInit(); -@@ -775,8 +901,25 @@ +@@ -775,8 +902,25 @@ } } @@ -4281,7 +4291,7 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java if (inAnApplet) { str = readParameter("Open New Window", false); -@@ -804,6 +947,90 @@ +@@ -804,6 +948,95 @@ deferScreenUpdates = readIntParameter("Defer screen updates", 20); deferCursorUpdates = readIntParameter("Defer cursor updates", 10); deferUpdateRequests = readIntParameter("Defer update requests", 50); @@ -4363,6 +4373,11 @@ diff -Naur JavaViewer.orig/VncViewer.java JavaViewer/VncViewer.java + if (str != null && str.equalsIgnoreCase("Yes")) { + graftFtp = true; + } ++ dsmActive = false; ++ str = readParameter("dsmActive", false); ++ if (str != null && str.equalsIgnoreCase("Yes")) { ++ dsmActive = true; ++ } + delayAuthPanel = false; + str = readParameter("delayAuthPanel", false); + if (str != null && str.equalsIgnoreCase("Yes")) { |