summaryrefslogtreecommitdiffstats
path: root/common/rfb/SConnection.cxx
diff options
context:
space:
mode:
authorConstantin Kaplinsky <const@tightvnc.com>2006-12-05 05:50:57 +0000
committerConstantin Kaplinsky <const@tightvnc.com>2006-12-05 05:50:57 +0000
commit4b9bf90584a608450e8cefb2223b4d4895d6bd4e (patch)
tree00f68e2ab25a4dae0ac74eda6c146e8f5924888c /common/rfb/SConnection.cxx
parent8280026282e0b6ced2d4cbc9848ff8951d5623e1 (diff)
downloadtigervnc-4b9bf90584a608450e8cefb2223b4d4895d6bd4e.tar.gz
tigervnc-4b9bf90584a608450e8cefb2223b4d4895d6bd4e.zip
Corrected support for TightVNC extensions - always sending authentication capability list even when authentication is not required. This may be incompatible with certain TightVNC viewers but this is the way to allow "no authentication" AND prompting local user to accept/reject incoming connection.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2181 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/SConnection.cxx')
-rw-r--r--common/rfb/SConnection.cxx29
1 files changed, 12 insertions, 17 deletions
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index deaa9668..130170f2 100644
--- a/common/rfb/SConnection.cxx
+++ b/common/rfb/SConnection.cxx
@@ -253,23 +253,18 @@ void SConnection::offerAuthentication()
if (caps.getSize() < 1)
throwConnFailedException("No supported security types");
- // FIXME: We should never send an empty capability list if we are prompting
- // local user to accept client connections. And if we do send an
- // empty list, then we cannot send a "security result".
- if (caps.includesOnly(secTypeNone)) {
- // Special case - if caps includes nothing else than secTypeNone, we send
- // an empty capability list and do not expect security type selection from
- // the client.
- os->writeU32(0);
- os->flush();
- processSecurityType(secTypeNone);
- } else {
- // Normal case - sending the list of authentication capabilities.
- os->writeU32(caps.getSize());
- caps.write(os);
- os->flush();
- state_ = RFBSTATE_TIGHT_AUTH_TYPE;
- }
+ // FIXME: We could send an empty capability list if we do not require
+ // authentication and any local user interaction. But the problem
+ // is that this class does not know if local user will be prompted
+ // to accept/reject connection.
+ // Thus, currently we always send non-empty capability lists,
+ // although this is not compatible with certain TightVNC viewers
+ // that do not understand authentication type "AuthNone" and expect
+ // an empty capability list for no authentication.
+ os->writeU32(caps.getSize());
+ caps.write(os);
+ os->flush();
+ state_ = RFBSTATE_TIGHT_AUTH_TYPE;
}
void SConnection::processAuthTypeMsg()