summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2016-01-26 15:47:35 -0600
committerMark Salyzyn2016-01-26 15:47:35 -0600
commit674ce6ef58527f5e48299da889d031daac1e770e (patch)
tree099c696676a10815724d1ddb55f580c248cfc845 /logd/LogListener.cpp
parent756332e88b98018d82f225c54734be3d76102bfc (diff)
downloadplatform-system-core-674ce6ef58527f5e48299da889d031daac1e770e.tar.gz
platform-system-core-674ce6ef58527f5e48299da889d031daac1e770e.tar.xz
platform-system-core-674ce6ef58527f5e48299da889d031daac1e770e.zip
Revert "logd: security buffer only AID_SYSTEM reader"
This reverts commit 756332e88b98018d82f225c54734be3d76102bfc. Change-Id: Ib8607ac758b7e88a9db716ec4274ec0e4e3dc596
Diffstat (limited to 'logd/LogListener.cpp')
-rw-r--r--logd/LogListener.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/logd/LogListener.cpp b/logd/LogListener.cpp
index cc6df8051..846dd7c41 100644
--- a/logd/LogListener.cpp
+++ b/logd/LogListener.cpp
@@ -36,18 +36,6 @@ LogListener::LogListener(LogBuffer *buf, LogReader *reader) :
36 reader(reader) { 36 reader(reader) {
37} 37}
38 38
39static bool clientHasSecurityCredentials(uid_t uid, gid_t gid, pid_t /* pid */) {
40 if (uid == AID_SYSTEM) {
41 return true;
42 }
43
44 if (gid == AID_SYSTEM) {
45 return true;
46 }
47
48 return false;
49}
50
51bool LogListener::onDataAvailable(SocketClient *cli) { 39bool LogListener::onDataAvailable(SocketClient *cli) {
52 static bool name_set; 40 static bool name_set;
53 if (!name_set) { 41 if (!name_set) {
@@ -110,7 +98,7 @@ bool LogListener::onDataAvailable(SocketClient *cli) {
110 98
111 if ((header->id == LOG_ID_SECURITY) && 99 if ((header->id == LOG_ID_SECURITY) &&
112 (!__android_log_security() || 100 (!__android_log_security() ||
113 !clientHasSecurityCredentials(cred->uid, cred->gid, cred->pid))) { 101 !clientHasLogCredentials(cred->uid, cred->gid, cred->pid))) {
114 return false; 102 return false;
115 } 103 }
116 104