Revert "logd: validate and fill in socket credentials"
We don't want to fake socket credentials if they were not provided by
the kernel. If there is a bug preventing us from reading the
credentials then it must be solved directly.
Test: logd, liblog unit tests
Test: boot and ensure overflow uid doesn't show up
This reverts commit c4e4823b00a94627e922eada1172688818471b0c.
Change-Id: I683129a8a214637635f163ae25c39bb8a47cd50f
diff --git a/logd/LogStatistics.h b/logd/LogStatistics.h
index 469f6dc..0782de3 100644
--- a/logd/LogStatistics.h
+++ b/logd/LogStatistics.h
@@ -306,6 +306,10 @@
std::string format(const LogStatistics& stat, log_id_t id) const;
};
+namespace android {
+uid_t pidToUid(pid_t pid);
+}
+
struct PidEntry : public EntryBaseDropped {
const pid_t pid;
uid_t uid;
@@ -385,13 +389,6 @@
uid(android::pidToUid(tid)),
name(android::tidToName(tid)) {
}
- TidEntry(pid_t tid)
- : EntryBaseDropped(),
- tid(tid),
- pid(android::tidToPid(tid)),
- uid(android::pidToUid(tid)),
- name(android::tidToName(tid)) {
- }
explicit TidEntry(const LogBufferElement* element)
: EntryBaseDropped(element),
tid(element->getTid()),
@@ -787,7 +784,6 @@
// helper (must be locked directly or implicitly by mLogElementsLock)
const char* pidToName(pid_t pid) const;
uid_t pidToUid(pid_t pid);
- pid_t tidToPid(pid_t tid);
const char* uidToName(uid_t uid) const;
};