Fix security svace defects accepted/tizen/4.0/unified/20170920.081406 submit/tizen_4.0/20170918.062601 tizen_4.0.IoT.p1_release tizen_4.0.m2_release
authoryeji01kim <yeji01.kim@samsung.com>
Fri, 15 Sep 2017 07:00:39 +0000 (16:00 +0900)
committerJaemin Ryu <jm77.ryu@samsung.com>
Fri, 15 Sep 2017 08:34:35 +0000 (17:34 +0900)
- Add return value check of function umount2

Change-Id: I8d4b72d3a7bb5969f638c89aeb53f21079cb2da6
Signed-off-by: yeji01kim <yeji01.kim@samsung.com>
server/manager.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 6db7446..8c4f22f
@@ -634,7 +634,8 @@ int Manager::removeKrate(const std::string& name)
 
                //umount TZ_USER_CONTENT
                        ::tzplatform_set_user(user.getUid());
-                       ::umount2(::tzplatform_getenv(TZ_USER_CONTENT), MNT_FORCE);
+                       if (::umount2(::tzplatform_getenv(TZ_USER_CONTENT), MNT_FORCE) != 0)
+                               throw runtime::Exception("Failed to umount2");
                        ::tzplatform_reset_user();
 
                        //remove krate user