summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2016-01-26 16:32:35 -0600
committerMark Salyzyn2016-02-01 15:29:06 -0600
commit8fa8896d2ed97eb274c62f0e386dabf2e2a82a45 (patch)
treede55ad6d14d070c71eec43d64ee7f5ce36c0257e /logd/LogTimes.cpp
parentc2c0df900ded71aa3f7c9aee05614c7c050eef06 (diff)
downloadplatform-system-core-8fa8896d2ed97eb274c62f0e386dabf2e2a82a45.tar.gz
platform-system-core-8fa8896d2ed97eb274c62f0e386dabf2e2a82a45.tar.xz
platform-system-core-8fa8896d2ed97eb274c62f0e386dabf2e2a82a45.zip
logd: security buffer only AID_SYSTEM reader
- limit AID_SYSTEM uid or gid to read security buffer messages - adjust liblog tests to reflect the reality of this adjustment To fully test all security buffer paths and modes $ su 0,0,0 /data/nativetest/liblog-unit-tests/liblog-unit-tests --gtest_filter=liblog.__security* $ su 1000,1000,1000 /data/nativetest/liblog-unit-tests/liblog-unit-tests --gtest_filter=liblog.__security* $ su 2000,2000,2000 /data/nativetest/liblog-unit-tests/liblog-unit-tests --gtest_filter=liblog.__security* ToDo: Integrate the above individually into the gTest Q/A testing Bug: 26029733 Change-Id: Idcf5492db78fa6934ef6fb43f3ef861052675651
Diffstat (limited to 'logd/LogTimes.cpp')
-rw-r--r--logd/LogTimes.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/logd/LogTimes.cpp b/logd/LogTimes.cpp
index b4c97a985..a4b96d33d 100644
--- a/logd/LogTimes.cpp
+++ b/logd/LogTimes.cpp
@@ -126,6 +126,7 @@ void *LogTimeEntry::threadStart(void *obj) {
126 LogBuffer &logbuf = me->mReader.logbuf(); 126 LogBuffer &logbuf = me->mReader.logbuf();
127 127
128 bool privileged = FlushCommand::hasReadLogs(client); 128 bool privileged = FlushCommand::hasReadLogs(client);
129 bool security = FlushCommand::hasSecurityLogs(client);
129 130
130 me->leadingDropped = true; 131 me->leadingDropped = true;
131 132
@@ -150,10 +151,10 @@ void *LogTimeEntry::threadStart(void *obj) {
150 unlock(); 151 unlock();
151 152
152 if (me->mTail) { 153 if (me->mTail) {
153 logbuf.flushTo(client, start, privileged, FilterFirstPass, me); 154 logbuf.flushTo(client, start, privileged, security, FilterFirstPass, me);
154 me->leadingDropped = true; 155 me->leadingDropped = true;
155 } 156 }
156 start = logbuf.flushTo(client, start, privileged, FilterSecondPass, me); 157 start = logbuf.flushTo(client, start, privileged, security, FilterSecondPass, me);
157 158
158 lock(); 159 lock();
159 160