[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/krfb
From: George Goldberg <grundleborg () googlemail ! com>
Date: 2009-09-16 12:13:52
Message-ID: 1253103232.039261.21005.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1024346 by gberg:
When we change the global can-control-keyboard-and-mouse property we should only \
apply this change to connections where the remote was initially permitted to control \
the keyboard and mouse. Othwise we should just leave control disabled whatever \
happens. This makes krfb err on the side of caution, so it is now much harder for the \
user to accidentally give control of their desktop to someone they didn't want to \
give it to.
BUG:166447
M +11 -0 connectioncontroller.cpp
M +4 -0 connectioncontroller.h
M +4 -1 krfbserver.cpp
--- trunk/KDE/kdenetwork/krfb/connectioncontroller.cpp #1024345:1024346
@@ -225,6 +225,7 @@
// rfbStartOnHoldClient(cl);
cl->onHold = false;
setControlEnabled(dialog->cbAllowRemoteControl->isChecked());
+ setControlCanBeEnabled(dialog->cbAllowRemoteControl->isChecked());
emit sessionEstablished(remoteIp);
}
@@ -239,4 +240,14 @@
controlEnabled = enable;
}
+void ConnectionController::setControlCanBeEnabled(bool canBeEnabled)
+{
+ m_controlCanBeEnabled = canBeEnabled;
+}
+bool ConnectionController::controlCanBeEnabled() const
+{
+ return m_controlCanBeEnabled;
+}
+
+
--- trunk/KDE/kdenetwork/krfb/connectioncontroller.h #1024345:1024346
@@ -39,6 +39,9 @@
void setControlEnabled(bool enable);
+ void setControlCanBeEnabled(bool canBeEnabled);
+ bool controlCanBeEnabled() const;
+
Q_SIGNALS:
void sessionEstablished(QString);
void notification(QString, QString);
@@ -52,6 +55,7 @@
QString remoteIp;
struct _rfbClientRec *cl;
bool controlEnabled;
+ bool m_controlCanBeEnabled;
/*
int fd;
KrfbServer *server;
--- trunk/KDE/kdenetwork/krfb/krfbserver.cpp #1024345:1024346
@@ -246,7 +246,9 @@
{
foreach (QPointer<ConnectionController> ptr, d->controllers) {
if (ptr) {
- ptr->setControlEnabled(enable);
+ if (ptr->controlCanBeEnabled()) {
+ ptr->setControlEnabled(enable);
+ }
}
}
}
@@ -259,6 +261,7 @@
d->controllers.append(cc);
cc->setControlEnabled(KrfbConfig::allowDesktopControl());
+ cc->setControlCanBeEnabled(KrfbConfig::allowDesktopControl());
connect(cc, SIGNAL(sessionEstablished(QString)), \
SIGNAL(sessionEstablished(QString)));
connect(cc, SIGNAL(clientDisconnected(ConnectionController \
*)),SLOT(clientDisconnected(ConnectionController *)));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic