aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SSecurity.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-09-21 15:31:11 +0200
committerPierre Ossman <ossman@cendio.se>2018-09-21 15:59:46 +0200
commitad2b3c4aa3db056b83f5d91564400e03f3239835 (patch)
treea81ce066072a3c5db0665e4e522d3fbfd1c221ea /common/rfb/SSecurity.h
parent50aaed49b67e451cad63b3846989d13f083aad0a (diff)
downloadtigervnc-ad2b3c4aa3db056b83f5d91564400e03f3239835.tar.gz
tigervnc-ad2b3c4aa3db056b83f5d91564400e03f3239835.zip
Strongly bind security objects to connection object
There is already an implicit connection between them, so let's make it explicit. This allows easy lookup outside of the processMsg() function.
Diffstat (limited to 'common/rfb/SSecurity.h')
-rw-r--r--common/rfb/SSecurity.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/rfb/SSecurity.h b/common/rfb/SSecurity.h
index 0280574d..8ae7902c 100644
--- a/common/rfb/SSecurity.h
+++ b/common/rfb/SSecurity.h
@@ -52,8 +52,9 @@ namespace rfb {
class SSecurity {
public:
+ SSecurity(SConnection* sc) { this->sc = sc; }
virtual ~SSecurity() {}
- virtual bool processMsg(SConnection* sc)=0;
+ virtual bool processMsg() = 0;
virtual int getType() const = 0;
// getUserName() gets the name of the user attempting authentication. The
@@ -63,6 +64,9 @@ namespace rfb {
virtual const char* getUserName() const = 0;
virtual SConnection::AccessRights getAccessRights() const { return SConnection::AccessDefault; }
+
+ protected:
+ SConnection* sc;
};
}