MXS-1312: Make the permission rule the default type

If a rule is defined with only an optional part, it should be of the
permission type. This type is used to signal that the rule matches if the
optional constraints are fulfilled.

Due to refactoring, the default type was changed from RT_PERMISSION to
RT_UNDEFINED.
This commit is contained in:
Markus Mäkelä 2017-07-07 15:41:10 +03:00
parent 9c4711aac8
commit d47e32966f

View File

@ -1007,7 +1007,7 @@ bool create_rule(void* scanner, const char* name)
if (ruledef && (ruledef->name = MXS_STRDUP(name)))
{
ruledef->type = RT_UNDEFINED;
ruledef->type = RT_PERMISSION;
ruledef->on_queries = QUERY_OP_UNDEFINED;
ruledef->next = rstack->rule;
ruledef->active = NULL;