A new smack error while using tizen.alarm webapi.
tizen.alarm webapi use pid's smack label(/prod/tid/attr/current)
to check privilege.
So we should call tizen.alarm.getAll() before drop privilege.
subject="User::Pkg::j5SOtj71QW" object="System::Privileged"
requested=r ppid=2418 ppid_comm="wrt-service" pid=2426
comm="wrt-service" path="/proc/2426" dev="proc" ino=217674
Referenece:
https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/289512/
Change-Id: Ie949a681295dbe39563fa23e9f2e53617466ac36
Signed-off-by: liwei <wei90727.li@samsung.com>
(cherry picked from commit
74b5e6e0c55bcee1368a5bb8f741d00034bef269)
// It must be handled ahead of dropThreadPrivilege()
// Otherwise, smack violation might hanppen from 'libdbuspolicy'.
global.tizen.systeminfo.getPropertyValue("CPU", () => { }, () => { });
+ global.tizen.alarm.getAll();
}
export function startService(id: string, filename: string) {