They don't get access bits until they've been authenticated, so avoid
doing any checks on clients in those early states.
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;