summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2014-04-28 18:39:04 -0500
committerMark Salyzyn2014-04-29 09:25:27 -0500
commite0fa291e898b451dc198ed52cebac3ffefac066e (patch)
tree602b61b224b6630c12129def669ebc4aa6cfab3b /logd/LogListener.cpp
parent4095853133745ddaa1e37b46f9e7d4e8a2cdee28 (diff)
downloadplatform-system-core-e0fa291e898b451dc198ed52cebac3ffefac066e.tar.gz
platform-system-core-e0fa291e898b451dc198ed52cebac3ffefac066e.tar.xz
platform-system-core-e0fa291e898b451dc198ed52cebac3ffefac066e.zip
logd: add logd.auditd property
- permit us a mechanism to disable auditd - standardize property boolean Bug: 14275676 Change-Id: I76f245c6aee511ed44274159e0ea55915b484dda
Diffstat (limited to 'logd/LogListener.cpp')
-rw-r--r--logd/LogListener.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/logd/LogListener.cpp b/logd/LogListener.cpp
index bc7622b73..6ff4d3a09 100644
--- a/logd/LogListener.cpp
+++ b/logd/LogListener.cpp
@@ -14,6 +14,7 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#include <limits.h>
17#include <sys/prctl.h> 18#include <sys/prctl.h>
18#include <sys/socket.h> 19#include <sys/socket.h>
19#include <sys/types.h> 20#include <sys/types.h>
@@ -100,11 +101,10 @@ bool LogListener::onDataAvailable(SocketClient *cli) {
100 101
101 // NB: hdr.msg_flags & MSG_TRUNC is not tested, silently passing a 102 // NB: hdr.msg_flags & MSG_TRUNC is not tested, silently passing a
102 // truncated message to the logs. 103 // truncated message to the logs.
103 unsigned short len = n; // cap to internal maximum 104
104 if (len == n) { 105 logbuf->log(log_id, realtime, cred->uid, cred->pid, tid, msg,
105 logbuf->log(log_id, realtime, cred->uid, cred->pid, tid, msg, len); 106 (n <= USHRT_MAX) ? (unsigned short) n : USHRT_MAX);
106 reader->notifyNewLog(); 107 reader->notifyNewLog();
107 }
108 108
109 return true; 109 return true;
110} 110}