Fix bug in eventTime comparison
The current logic when collecting Selinux events for logging is as follows: 1. The first time the LogsService run, it collects events in the [mLastWrite_N, mLastWrite_N+1] time bucket, 2. The next time, it collects events in the [mLastWrite_N+1, mLastWrite_N+2] time bucket. By this logic, events happening at time mLastWrite_N+1 are collected two times. With this CL, a LogService run will collect events in the (mLastWrite_N+1, mLastWrite_N+2] bucket (startpoints excluded), avoiding the double collection. Bug: 295861450 Test: atest SelinuxAuditLogsCollectorTest SelinuxAuditLogsBuilderTest Change-Id: I3668e40789621db29b1dea73797fd56b6fd77bed
Loading
Please register or sign in to comment