Handling the ABSPATH for XML(manifest) file.
authorSung-jae Park <nicesj.park@samsung.com>
Sat, 24 Jan 2015 11:10:49 +0000 (20:10 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Sat, 24 Jan 2015 11:10:49 +0000 (20:10 +0900)
commit2e72ae8d8aea3ef1ccfffe8e08af1cda92067065
treeb896816727c1086ec32d480a1e5efedc27d08069
parentcf922e0c85def967bc12a9e554ad8cb6cdd4e7fe
Handling the ABSPATH for XML(manifest) file.

Even if a user tries to use the relative path in its XML file,
this pkgmgr_dynamicbox should filter them.
So every relative path should be converted to the abspath first.
and then the prefix "APP_BASE_PREFIX" will be attached to.

ex)
XML)
preview="res/../../../../share/default/icon.png"
--> will be converted to "/share/default/icon.png" by abspath function.

API)
dynamicbox_service API will attach the APP_BASE_PREFIX.
--> preview = /usr/apps/com.samsung.sample/share/default/icon.png

so there is no way the user can access the unauthorized path.

[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: Iba79d776405a393695d63f2344a5e0e7d5953299
pkgmgr_dynamicbox/src/service_register.c