diff options
author | Pierre Ossman <ossman@cendio.se> | 2020-08-21 15:53:59 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2020-08-21 15:53:59 +0200 |
commit | ebd1b4db1540670200f2a936161999672a64be02 (patch) | |
tree | 1b995493353bd97e7d1299b84943cf32e3cb82f8 | |
parent | 331a27addf46d39635fb4d195ae2f94058689832 (diff) | |
download | tigervnc-ebd1b4db1540670200f2a936161999672a64be02.tar.gz tigervnc-ebd1b4db1540670200f2a936161999672a64be02.zip |
Hide base SConnection methods from VNCServerST
It should be using the safe wrappers for everything so make sure it
cannot bypass those and call the SConnection methods directly.
-rw-r--r-- | common/rfb/VNCSConnectionST.h | 4 | ||||
-rw-r--r-- | common/rfb/VNCServerST.cxx | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h index c8f4c24f..617e3c39 100644 --- a/common/rfb/VNCSConnectionST.h +++ b/common/rfb/VNCSConnectionST.h @@ -37,7 +37,7 @@ namespace rfb { class VNCServerST; - class VNCSConnectionST : public SConnection, + class VNCSConnectionST : private SConnection, public Timer::Callback { public: VNCSConnectionST(VNCServerST* server_, network::Socket* s, bool reverse); @@ -48,6 +48,8 @@ namespace rfb { virtual bool accessCheck(AccessRights ar) const; virtual void close(const char* reason); + using SConnection::authenticated; + // Methods called from VNCServerST. None of these methods ever knowingly // throw an exception. diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index f09715a4..17e963e8 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -599,7 +599,7 @@ SConnection* VNCServerST::getConnection(network::Socket* sock) { std::list<VNCSConnectionST*>::iterator ci; for (ci = clients.begin(); ci != clients.end(); ci++) { if ((*ci)->getSock() == sock) - return *ci; + return (SConnection*)*ci; } return 0; } |