aboutsummaryrefslogtreecommitdiffstats
path: root/win/winvnc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2022-11-07 13:17:27 +0100
committerPierre Ossman <ossman@cendio.se>2022-11-07 13:17:27 +0100
commitdd8d208e8d1e8852f6f8f16dbac81e461a71dd99 (patch)
treed562c5dc77639b42a840e9ae247537fcd96e961d /win/winvnc
parent4ddd7f47e76e48f21ada4a1cf1e6c70ac48105b5 (diff)
downloadtigervnc-dd8d208e8d1e8852f6f8f16dbac81e461a71dd99.tar.gz
tigervnc-dd8d208e8d1e8852f6f8f16dbac81e461a71dd99.zip
Don't do access checks on early clients
They don't get access bits until they've been authenticated, so avoid doing any checks on clients in those early states.
Diffstat (limited to 'win/winvnc')
-rw-r--r--win/winvnc/VNCServerWin32.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx
index 34cda378..79769e93 100644
--- a/win/winvnc/VNCServerWin32.cxx
+++ b/win/winvnc/VNCServerWin32.cxx
@@ -364,9 +364,11 @@ void VNCServerWin32::getConnInfo(ListConnInfo * listConn)
if (!conn)
continue;
- if (conn->accessCheck(rfb::SConnection::AccessPtrEvents |
- rfb::SConnection::AccessKeyEvents |
- rfb::SConnection::AccessView))
+ if (!conn->authenticated())
+ status = 3;
+ else if (conn->accessCheck(rfb::SConnection::AccessPtrEvents |
+ rfb::SConnection::AccessKeyEvents |
+ rfb::SConnection::AccessView))
status = 0;
else if (conn->accessCheck(rfb::SConnection::AccessView))
status = 1;