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 <dh81.song@samsung.com>
(cherry picked from commit
f455dc5f4287ca57dbfd3fafa830a7ea408aa6f8)
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' });
requestStopService(id);
return;
}
+
+ global.ssoGuid = wrt.tv?.getSSOGuid();
wrt.setServiceAppId(id);
wrt.security?.dropThreadPrivilege(packageId, serviceId);