Fix the access issue to shared/res of web app 72/138972/12
authorjongmyeongko <jongmyeong.ko@samsung.com>
Fri, 14 Jul 2017 12:06:58 +0000 (21:06 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Tue, 8 Aug 2017 10:34:09 +0000 (10:34 +0000)
commit10e66198daa889dccc458b501d3ee35d39e4cd8e
treee8fd94cfe425a1e6509df3acda588df0f7069331
parent2c4bae4af1d3369d7c4994d550e1db92910c6d9b
Fix the access issue to shared/res of web app

Other applications can't access the contents of ${pkg_path}/res/wgt/shared/res
because of SMACK denial.
So, the all contents of ${pkg_path}/res/wgt/shared/res should be in shared/res
to avoid SMACK error.

Also, we should consider delta update issue.
The issue is the signature validation check failure because of unsigned file.
In ${pkg_path}/shared/res, there can be generated files such as apps icon.
and there can be other application's data of shared/res in case of Hybrid package.
These files are unsigend one.
To fix the issue,
unlink and move back all original contents for ${pkg_path}/res/wgt/shared/res
before delta update.

Submit with :
https://review.tizen.org/gerrit/#/c/139133/

Change-Id: I83718f109fbe4614c41977f4d680e65f007dad86
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
(cherry picked from commit 1e4547168e14eb59fc18c6f586d9a67126587b04)
src/unit_tests/smoke_test.cc
src/wgt/step/filesystem/step_wgt_patch_storage_directories.cc
src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.cc
src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h