Protect access to parent folders 45/285245/6
authorChanggyu Choi <changyu.choi@samsung.com>
Thu, 8 Dec 2022 05:29:32 +0000 (14:29 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Thu, 8 Dec 2022 07:13:59 +0000 (16:13 +0900)
commit20cb9b62756f153ef950d85def8df503bf35ffd2
treea29588a7537caa703ea0a4b79d9ccff6971579ac
parent0f50e90d23ac1c43365c6699f6f9623290a89b8c
Protect access to parent folders

If file_path is the relative path to the upper folder (e.g., "../") put in,
the operation will be authorized more than API intention.
This patch prevents access to parent folders than the user data folder.

Change-Id: I75852ac321d6b661da91b25cd1c429512d59e7c5
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/pkg_cleardata/pkg_cleardata.c