- If a directory in the path has 700 permission, access() will fail.
Change-Id: I31619393ef324f0b3bc923f2332aa7721683d18a
Signed-off-by: Jihoi Kim <jihoi.kim@samsung.com>
try {
auto app_com_socket = std::make_shared<AppComSocket>(pid, uid, this);
std::string endpoint = GetEndpoint(pid, uid);
- if (access(endpoint.c_str(), F_OK) != 0) {
+
+ // NOTE: If a directory in endpoint path has 700 permission, access() fail.
+ std::filesystem::path path(endpoint);
+ if (!std::filesystem::exists(path)) {
_E("pid(%d) app com endpoint does not exists. errno(%d)", pid, errno);
return nullptr;
}