MXS-1346: Make dbfwfilter objects non-copyable

The User and Rule classes should not be copied.
This commit is contained in:
Markus Mäkelä
2017-08-31 11:46:38 +03:00
parent eee32a4e21
commit ee88ae67f8
2 changed files with 10 additions and 2 deletions

View File

@ -20,8 +20,12 @@
* Each type of rule has different requirements that are expressed as void pointers.
* This allows to match an arbitrary set of rules against a user.
*/
struct Rule
class Rule
{
Rule(const Rule&);
Rule& operator=(const Rule&);
public:
Rule(std::string name);
virtual ~Rule();
virtual bool matches_query(GWBUF* buffer, char** msg);

View File

@ -33,8 +33,12 @@ typedef std::list<SUserTemplate> TemplateList;
/**
* A user definition
*/
struct User
class User
{
User(const User&);
User& operator=(const User&);
public:
User(std::string name):
name(name),
lock(SPINLOCK_INIT),