From c6436ad6b2099fefbee2c8d19618b72d5d7aa151 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 15 Feb 2024 11:40:12 +0000 Subject: [PATCH] Revert change of default ACL priority --- plugins/dynamic-security/roles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/dynamic-security/roles.c b/plugins/dynamic-security/roles.c index b5c03fcf..630e1df9 100644 --- a/plugins/dynamic-security/roles.c +++ b/plugins/dynamic-security/roles.c @@ -235,7 +235,7 @@ static int dynsec_roles__acl_load(cJSON *j_acls, const char *key, struct dynsec_ } strncpy(acl->topic, topic, topic_len+1); - json_get_int(j_acl, "priority", &acl->priority, true, -1); + json_get_int(j_acl, "priority", &acl->priority, true, 0); if(acl->priority > PRIORITY_MAX) acl->priority = PRIORITY_MAX; json_get_bool(j_acl, "allow", &acl->allow, true, false); @@ -675,7 +675,7 @@ int dynsec_roles__process_add_acl(struct dynsec__data *data, struct mosquitto_co } strncpy(acl->topic, topic, topic_len+1); - json_get_int(cmd->j_command, "priority", &acl->priority, true, -1); + json_get_int(cmd->j_command, "priority", &acl->priority, true, 0); if(acl->priority > PRIORITY_MAX) acl->priority = PRIORITY_MAX; json_get_bool(cmd->j_command, "allow", &acl->allow, true, false);