diff options
author | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-08-06 15:33:53 +0300 |
---|---|---|
committer | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-08-06 15:33:53 +0300 |
commit | 5274068afd5dd611d369361b775e805800ec9378 (patch) | |
tree | b90b8c88b8cea853cff3e44c1b6632c9049d1afe /src/libs/zbxaudit/audit_host.c | |
parent | 739377e26b19e936ef594b03996c858e1afe2954 (diff) |
........S. [ZBXNEXT-6802] added audit for unlinking templates
Diffstat (limited to 'src/libs/zbxaudit/audit_host.c')
-rw-r--r-- | src/libs/zbxaudit/audit_host.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/libs/zbxaudit/audit_host.c b/src/libs/zbxaudit/audit_host.c index 317cf9d399b..e5a3537d0eb 100644 --- a/src/libs/zbxaudit/audit_host.c +++ b/src/libs/zbxaudit/audit_host.c @@ -336,12 +336,16 @@ void zbx_audit_host_prototype_update_json_add_group_details(zbx_uint64_t hostid, } } -void zbx_audit_host_update_json_add_parent_template(zbx_uint64_t hostid, zbx_uint64_t templateid) -{ - RETURN_IF_AUDIT_OFF(); +#define PREPARE_AUDIT_TEMPLATE_OP(op1, op2) \ +void zbx_audit_host_update_json_##op1##_parent_template(zbx_uint64_t hostid, zbx_uint64_t templateid) \ +{ \ + RETURN_IF_AUDIT_OFF(); \ + \ + zbx_audit_update_json_append_uint64(hostid, op2, "host.templates", templateid); \ +} \ - zbx_audit_update_json_append_uint64(hostid, AUDIT_DETAILS_ACTION_ATTACH, "host.templates", templateid); -} +PREPARE_AUDIT_TEMPLATE_OP(attach, AUDIT_DETAILS_ACTION_ATTACH) +PREPARE_AUDIT_TEMPLATE_OP(detach, AUDIT_DETAILS_ACTION_DETACH) void zbx_audit_host_prototype_update_json_add_templates(zbx_uint64_t hostid, zbx_vector_uint64_t *templateids) { |