summaryrefslogtreecommitdiffstats
path: root/src/pvs.cpp
diff options
context:
space:
mode:
authorSebastien Braun2010-10-11 00:52:21 +0200
committerSebastien Braun2010-10-11 00:56:10 +0200
commitd626b99839eb2cf915d96b4048d31e6622ad00ca (patch)
treeb8b5504626a69919c0f68397d0d93cc628bdd1e5 /src/pvs.cpp
parentFix bug where pressing the closeUp-button sometimes results in no action. (diff)
downloadpvs-d626b99839eb2cf915d96b4048d31e6622ad00ca.tar.gz
pvs-d626b99839eb2cf915d96b4048d31e6622ad00ca.tar.xz
pvs-d626b99839eb2cf915d96b4048d31e6622ad00ca.zip
Add access control check to input event handling in PVS daemon
Diffstat (limited to 'src/pvs.cpp')
-rwxr-xr-xsrc/pvs.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pvs.cpp b/src/pvs.cpp
index 96a92ea..e0605c2 100755
--- a/src/pvs.cpp
+++ b/src/pvs.cpp
@@ -199,8 +199,11 @@ void PVS::onCommand(PVSMsg cmdMessage)
if (ident.compare("INPUTEVENT") == 0)
{
InputEvent evt;
- eventFromString(message, evt);
- handleInputEvent(evt);
+ if(inputEventsAllowed())
+ {
+ eventFromString(message, evt);
+ handleInputEvent(evt);
+ }
}
if (ident.compare("MCASTFTRETRY") == 0)
{
@@ -749,6 +752,12 @@ bool PVS::createMulticastTransfer(QString const& objectPath, quint64& transferID
// Input handling
+bool PVS::inputEventsAllowed()
+{
+ QString lecturer = getConfigValue("Permissions/vnc_lecturer");
+ return r == "rw";
+}
+
void PVS::handleInputEvent(InputEvent const& evt)
{
QString s = evt.toString();