logd: institute getGroups for socket credentials
(cherry pick from commit 4d851290fc81eb36d2fcf76e6f06213a28b877f5)
Change-Id: Ib8be84d2a3f873e91fb1495df439a498f395c137
diff --git a/logd/FlushCommand.cpp b/logd/FlushCommand.cpp
index f6f8cb8..0b8c31b 100644
--- a/logd/FlushCommand.cpp
+++ b/logd/FlushCommand.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2013 The Android Open Source Project
+ * Copyright (C) 2012-2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,11 +15,12 @@
*/
#include <stdlib.h>
-#include <private/android_filesystem_config.h>
+
#include "FlushCommand.h"
#include "LogBufferElement.h"
-#include "LogTimes.h"
+#include "LogCommand.h"
#include "LogReader.h"
+#include "LogTimes.h"
FlushCommand::FlushCommand(LogReader &reader,
bool nonBlock,
@@ -80,7 +81,5 @@
}
bool FlushCommand::hasReadLogs(SocketClient *client) {
- return (client->getUid() == AID_ROOT)
- || (client->getGid() == AID_ROOT)
- || (client->getGid() == AID_LOG);
+ return clientHasLogCredentials(client);
}