return c;
}
+
+SConnection::AccessRights SSecurityStack::getAccessRights() const
+{
+ SConnection::AccessRights accessRights;
+
+ if (!state0 && !state1)
+ return SSecurity::getAccessRights();
+
+ accessRights = SConnection::AccessFull;
+
+ if (state0)
+ accessRights &= state0->getAccessRights();
+ if (state1)
+ accessRights &= state1->getAccessRights();
+
+ return accessRights;
+}
virtual bool processMsg(SConnection* cc);
virtual int getType() const { return type; };
virtual const char* getUserName() const;
+ virtual SConnection::AccessRights getAccessRights() const;
protected:
short state;
SSecurity* state0;
return ssecurity->processMsg(sc);
}
+const char* SSecurityVeNCrypt::getUserName() const
+{
+ if (ssecurity == NULL)
+ return NULL;
+ return ssecurity->getUserName();
+}
+
+SConnection::AccessRights SSecurityVeNCrypt::getAccessRights() const
+{
+ if (ssecurity == NULL)
+ return SSecurity::getAccessRights();
+ return ssecurity->getAccessRights();
+}
SSecurityVeNCrypt(SecurityServer *sec);
~SSecurityVeNCrypt();
virtual bool processMsg(SConnection* sc);// { return true; }
- virtual int getType() const { return secTypeVeNCrypt; }
- virtual const char* getUserName() const { return NULL; }
+ virtual int getType() const { return chosenType; }
+ virtual const char* getUserName() const;
+ virtual SConnection::AccessRights getAccessRights() const;
protected:
SSecurity *ssecurity;