Fix AppComBroker::Send() method 08/265008/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 7 Oct 2021 01:43:37 +0000 (10:43 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 7 Oct 2021 01:43:37 +0000 (10:43 +0900)
This patch adds the sender uid check for system users.
If the uid is less than minimum regular uid, AMD doesn't check
whether the uid is equal to the sender uid or not.

Change-Id: I9193c3429d216b323b9983cb76dfff7ed5d2e280
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/app_com/app_com_broker.cc

index b7759a90314b18070bbca5837a2462aa53656291..c936eef8b9fefabc8bca366a49ce67eb8b028ed9 100644 (file)
@@ -113,7 +113,8 @@ int AppComBroker::Send(const std::string& endpoint,
       continue;
 
     uid_t uid = client->GetUid();
-    if (uid >= REGULAR_UID_MIN && uid != sender_uid)
+    if (uid >= REGULAR_UID_MIN && sender_uid >= REGULAR_UID_MIN &&
+        uid != sender_uid)
       continue;
 
     queue_.Push(AppComMessage(pid, uid, envelope));