[Service] Move dropThreadPrivilege() before app starting 60/254960/4 submit/tizen/20210311.160018
authorDongHyun Song <dh81.song@samsung.com>
Thu, 11 Mar 2021 04:45:26 +0000 (13:45 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Thu, 11 Mar 2021 10:02:14 +0000 (10:02 +0000)
commita47b04acbef17108bfc13c0cf3ca0331b95181c5
tree901f445e74852aa1e8004afccaff7eda5626284e
parentfdc484ce6f62be0326dc4ebc8d60972934f96c59
[Service] Move dropThreadPrivilege() before app starting

If applying app smack label before of webapis related works, there
are fails of loading webapis due to smack deny.

Of course, at first time, before loading webapis, app label should
be applied on the node worker thread. But kind of modules are
checking the privileges with 'pid', not 'tid'
So, webapis loading are not loaded all successfully.

This patch makes to defer privilege drop after webapis related works.
(access_control_manager, device_api_router)

Change-Id: I89849e4271cddde2e22a6bca77f77b503ee30cd8
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/common/service_runner.ts
wrt_app/service/access_control_manager.ts