Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20077

Server audit hashset entries may collide if different resource types have the same ids

    XMLWordPrintable

Details

    • Problem report
    • Resolution: Fixed
    • Trivial
    • 6.0.0alpha5, 6.0 (plan)
    • 6.0.0alpha4
    • Server (S)
    • None
    • Team C
    • Sprint 81 (Oct 2021)
    • 1

    Description

      Currently server audit stores entries in the hashet and uses the resource id. But, in theory, different entities with different resource types may have the same resource id:
      e.g trigger, item and host may end-up sharing the same resourceid.
      Resourceid is based on the ids table and it guarantees uniqueness only for the entities from the single table.
      Adding protection from collision should be straightforward - we would only need to add the object type when calling audit hashset insert/extract operation.
      (object type is not the same as resource type, resource type can be item and item prototypes, object type for both of them would be item, using such object type is much simpler since resource type is not always available(would need to be queried), but object type is always available - it is essentially the name of the file - calls from audit_item.c means the object type always would be item)

      Attachments

        Activity

          People

            arimdjonoks Artjoms Rimdjonoks
            arimdjonoks Artjoms Rimdjonoks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: