diff options
author | antirez <antirez@gmail.com> | 2020-02-04 13:19:40 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-02-04 13:19:40 +0100 |
commit | 90fae58b49cbc0bf0be76fe889952a81f4c3aed1 (patch) | |
tree | 9d9a7b87b98191ed2ed70add82051594bf295eca /src/acl.c | |
parent | 64a73e9293154482977cd530a2adc05f1fcc92f6 (diff) | |
download | redis-90fae58b49cbc0bf0be76fe889952a81f4c3aed1.tar.gz |
ACL LOG: make max log entries configurable.acl-log
Diffstat (limited to 'src/acl.c')
-rw-r--r-- | src/acl.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1576,6 +1576,12 @@ void addACLLogEntry(client *c, int reason, int keypos, sds username) { /* Add it to our list of entires. We'll have to trim the list * to its maximum size. */ listAddNodeHead(ACLLog, le); + while(listLength(ACLLog) > server.acllog_max_len) { + listNode *ln = listLast(ACLLog); + ACLLogEntry *le = listNodeValue(ln); + ACLFreeLogEntry(le); + listDelNode(ACLLog,ln); + } } } |