From: DongHyun Song Date: Fri, 2 Dec 2022 06:16:37 +0000 (+0900) Subject: [VD] Fix a smack error when getSSOGuid() X-Git-Tag: submit/tizen/20221202.160017^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f455dc5f4287ca57dbfd3fafa830a7ea408aa6f8;p=platform%2Fframework%2Fweb%2Fwrtjs.git [VD] Fix a smack error when getSSOGuid() When use sso_get_guid(), smack error happens by access of pid smack label. This patch take sso_get_guid() before smack label change and set global value. Change-Id: Ia6faa64d9104c5bb684f30c2c17e0ed7a19ce97a Signed-off-by: DongHyun Song --- diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 33692cb..1a61b62 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -208,7 +208,7 @@ export class DeviceAPIRouter { if (wrt.tv) { global.webapis.sso = {}; global.webapis.sso.getGuid = () => { - return wrt.tv?.getSSOGuid() || ''; + return global.ssoGuid || ''; } global.webapis.sso.getOspAccessToken = (clientId: string, secret: string, resolve: Function, reject?: Function) => { parentPort?.postMessage({ type: 'register-message', listener: 'OspAccessToken' }); diff --git a/wrt_app/service/service_runner.ts b/wrt_app/service/service_runner.ts index de15a91..355347c 100644 --- a/wrt_app/service/service_runner.ts +++ b/wrt_app/service/service_runner.ts @@ -77,6 +77,8 @@ export function start(id: string, filename: string) { requestStopService(id); return; } + + global.ssoGuid = wrt.tv?.getSSOGuid(); wrt.setServiceAppId(id); wrt.security?.dropThreadPrivilege(packageId, serviceId);