diff options
author | Andris Zeila <andris.zeila@zabbix.com> | 2021-10-18 16:45:59 +0300 |
---|---|---|
committer | Andris Zeila <andris.zeila@zabbix.com> | 2021-10-18 16:45:59 +0300 |
commit | 17c7126e45c4d4478fc8a925bc6f0860bf3241eb (patch) | |
tree | 5ac0d3e1da134e499a14011a88d20143bef19b9b /src/libs/zbxaudit/audit_settings.c | |
parent | ace75059a353c13665987c112724e70dc312954f (diff) |
........S. [ZBXNEXT-6923] added missing files
Diffstat (limited to 'src/libs/zbxaudit/audit_settings.c')
-rw-r--r-- | src/libs/zbxaudit/audit_settings.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/libs/zbxaudit/audit_settings.c b/src/libs/zbxaudit/audit_settings.c new file mode 100644 index 00000000000..5cb5a752d2d --- /dev/null +++ b/src/libs/zbxaudit/audit_settings.c @@ -0,0 +1,42 @@ +/* +** Zabbix +** Copyright (C) 2001-2021 Zabbix SIA +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +**/ + +#include "zbxalgo.h" +#include "zbxjson.h" +#include "audit.h" +#include "audit_settings.h" + +void zbx_audit_settings_create_entry(int audit_action, zbx_uint64_t configid) +{ + zbx_audit_entry_t local_audit_entry, *plocal_audit_entry = &local_audit_entry; + + RETURN_IF_AUDIT_OFF(); + + local_audit_entry.id = configid; + local_audit_entry.cuid = NULL; + + if (NULL == zbx_hashset_search(zbx_get_audit_hashset(), &plocal_audit_entry)) + { + zbx_audit_entry_t *new_entry; + + new_entry = zbx_audit_entry_init(configid, "", audit_action, AUDIT_RESOURCE_SETTINGS); + zbx_hashset_insert(zbx_get_audit_hashset(), &new_entry, sizeof(new_entry)); + } +} + |