File readable check by ::fopen instead of ::access 51/74451/2
authorKyungwook Tak <k.tak@samsung.com>
Tue, 14 Jun 2016 08:08:28 +0000 (17:08 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Tue, 14 Jun 2016 08:29:21 +0000 (17:29 +0900)
commitda7c710346176fa295b9e094b324ab6b6b07fc85
tree1bd699d7f70e214abb2c4e4fa03a50327f7f3c2b
parent971c6b909d6563f432e705bbf6498628eeddbbfc
File readable check by ::fopen instead of ::access

To adjust CAP_DAC_READ_SEARCH capability for scanning app directory in
platform v3.0, we cannot use ::access. Because the capability isn't
giving permission to force out all of DAC checking, but it just bypass
to check it. So if it's checked explicitly by ::access, we cannot
bypass. So we use ::fopen with "rb" mode instead.

Change-Id: If9c79f28978ab95b607f4bffbb605f57b8b51fa9
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
src/framework/service/cs-logic.cpp
src/framework/service/fs-utils.cpp
src/framework/service/fs-utils.h
test/engine/content-screening/sample-engine.cpp
test/internals/test-file-system.cpp