[Iotcon] Synchronously checking access to file 11/168711/3
authorSzymon Jastrzebski <s.jastrzebsk@partner.samsung.com>
Tue, 30 Jan 2018 08:12:30 +0000 (09:12 +0100)
committerPiotr Kosko <p.kosko@samsung.com>
Wed, 25 Apr 2018 12:30:21 +0000 (12:30 +0000)
ACR: http://suprem.sec.samsung.net/jira/browse/TWDAPI-187

Change-Id: I83ded470ff06f40065879667d4f43fba8356c7d7
Signed-off-by: Szymon Jastrzebski <s.jastrzebsk@partner.samsung.com>
src/iotcon/iotcon_instance.cc

index 705fb1f..8339a48 100644 (file)
@@ -1806,6 +1806,8 @@ common::TizenResult IotconInstance::Initialize(const picojson::object& args) {
   std::string realPath =
       common::FilesystemProvider::Create().GetRealPath(filePath.get<std::string>());
 
+  CHECK_STORAGE_ACCESS_AND_RETURN(realPath);
+
   auto result = IotconUtils::ConvertIotconError(iotcon_initialize(realPath.c_str()));
   if (!result) {
     LogAndReturnTizenError(result);