From c79e0aada7fa5518b0c512cc8abd8b7d113114a5 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 4 Feb 2021 13:30:50 +0900 Subject: [PATCH] Fix handling access control of component port Before sending the result, the server should receive the request data. Even though the result is "permission denied", the result can be "I/O error" When the client is still sending. Change-Id: I15897fd821129dc3de1539fe6d6860d754966e46 Signed-off-by: Hwankyu Jhun --- component_based/port/server.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/component_based/port/server.cc b/component_based/port/server.cc index 13078bf..c392db9 100644 --- a/component_based/port/server.cc +++ b/component_based/port/server.cc @@ -141,6 +141,9 @@ gboolean Server::GIOFunc(GIOChannel* source, GIOCondition cond, gpointer data) { int ret = handle->CheckPrivilege(client->GetFd()); if (ret != 0) { _E("Request is denied"); + std::vector buf; + client->Recv(buf); + std::vector dummy; Response res(ret, dummy); tizen_base::Parcel res_parcel; -- 2.34.1