summaryrefslogtreecommitdiff
path: root/init/service_parser.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2020-04-29 17:58:18 -0700
committerTom Cherry <tomcherry@google.com>2020-04-30 10:06:07 -0700
commit385c2c93c2f95d87c362ac92a4951b359509b01a (patch)
tree530fb301e84f4e09c439259e5927bb316c86b14a /init/service_parser.cpp
parent2e3af867d927e861e66b750e634e6b883967d9b6 (diff)
logd: refactor mLast setting into a GetOldest function
This code was duplicated throughout LogBuffer.cpp, so refactor it into a single location and clean up some comments along the way. This may fix a subtle bug: if `logcat -c` is used from a non-privileged UID, the current code may set mLast to the oldest seen log message *from that UID* and not not the oldest log message for that log id. That may prevent pruning from the start of that log, resulting in old log entries that are impossible to delete. Bug: 144382260 Test: logging works, and above scenario is not seen Change-Id: I1749293ce6ea1697dd8a9258cfd7eab29dbeac6e
Diffstat (limited to 'init/service_parser.cpp')
0 files changed, 0 insertions, 0 deletions