This function will check if ACL entries 'a' and 'b' are similar enough * that we should actually update the existing entry in our ACL log instead * of creating a new one. */
| 1769 | * that we should actually update the existing entry in our ACL log instead |
| 1770 | * of creating a new one. */ |
| 1771 | int ACLLogMatchEntry(ACLLogEntry *a, ACLLogEntry *b) { |
| 1772 | if (a->reason != b->reason) return 0; |
| 1773 | if (a->context != b->context) return 0; |
| 1774 | mstime_t delta = a->ctime - b->ctime; |
| 1775 | if (delta < 0) delta = -delta; |
| 1776 | if (delta > ACL_LOG_GROUPING_MAX_TIME_DELTA) return 0; |
| 1777 | if (sdscmp(a->object,b->object) != 0) return 0; |
| 1778 | if (sdscmp(a->username,b->username) != 0) return 0; |
| 1779 | return 1; |
| 1780 | } |
| 1781 | |
| 1782 | /* Release an ACL log entry. */ |
| 1783 | void ACLFreeLogEntry(void *leptr) { |
no test coverage detected