aboutsummaryrefslogtreecommitdiff
path: root/sys/security
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2012-11-30 23:03:51 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2012-11-30 23:03:51 +0000
commit1d8cd15cf8fae505ecc735d9dee3182d4f45865c (patch)
tree3db53a6aed8d60ee647876381794ebec8f47a2de /sys/security
parent629314041114ee9ebce5303195cc9b7eb83b4ba4 (diff)
Notes
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/audit/audit_worker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/security/audit/audit_worker.c b/sys/security/audit/audit_worker.c
index dd0eac724c44..caad5ac2eb2b 100644
--- a/sys/security/audit/audit_worker.c
+++ b/sys/security/audit/audit_worker.c
@@ -189,11 +189,11 @@ audit_record_write(struct vnode *vp, struct ucred *cred, void *data,
* to the daemon. This is only approximate, which is fine as more
* records may be generated before the daemon rotates the file.
*/
- if ((audit_fstat.af_filesz != 0) && (audit_file_rotate_wait == 0) &&
- (audit_size >= audit_fstat.af_filesz)) {
+ if (audit_fstat.af_filesz != 0 &&
+ audit_size >= audit_fstat.af_filesz * (audit_file_rotate_wait + 1)) {
AUDIT_WORKER_LOCK_ASSERT();
- audit_file_rotate_wait = 1;
+ audit_file_rotate_wait++;
(void)audit_send_trigger(AUDIT_TRIGGER_ROTATE_KERNEL);
}