Complain about missing read permissions once, as it's a typical config mistake
This commit is contained in:
@@ -64,7 +64,7 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
|
|||||||
needsPermCheck(false), pointerEventTime(0),
|
needsPermCheck(false), pointerEventTime(0),
|
||||||
clientHasCursor(false),
|
clientHasCursor(false),
|
||||||
accessRights(AccessDefault), startTime(time(0)), frameTracking(false),
|
accessRights(AccessDefault), startTime(time(0)), frameTracking(false),
|
||||||
udpFramesSinceFull(0)
|
udpFramesSinceFull(0), complainedAboutNoViewRights(false)
|
||||||
{
|
{
|
||||||
setStreams(&sock->inStream(), &sock->outStream());
|
setStreams(&sock->inStream(), &sock->outStream());
|
||||||
peerEndpoint.buf = sock->getPeerEndpoint();
|
peerEndpoint.buf = sock->getPeerEndpoint();
|
||||||
@@ -1308,8 +1308,14 @@ void VNCSConnectionST::writeFramebufferUpdate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(accessRights & AccessView))
|
if (!(accessRights & AccessView)) {
|
||||||
|
if (!complainedAboutNoViewRights) {
|
||||||
|
complainedAboutNoViewRights = true;
|
||||||
|
vlog.error("User %s has no read permissions. If this is not intended, grant them permissions with kasmvncpasswd or via the API",
|
||||||
|
user);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Updates often consists of many small writes, and in continuous
|
// Updates often consists of many small writes, and in continuous
|
||||||
// mode, we will also have small fence messages around the update. We
|
// mode, we will also have small fence messages around the update. We
|
||||||
|
|||||||
@@ -324,6 +324,7 @@ namespace rfb {
|
|||||||
|
|
||||||
bool frameTracking;
|
bool frameTracking;
|
||||||
uint32_t udpFramesSinceFull;
|
uint32_t udpFramesSinceFull;
|
||||||
|
bool complainedAboutNoViewRights;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user