AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
AddStep(&TaskManifestFile::stepCopyAccountIconFiles);
AddStep(&TaskManifestFile::stepCreateExecFile);
+ AddStep(&TaskManifestFile::stepCreateLinkNPPluginsFile);
AddStep(&TaskManifestFile::stepGenerateManifest);
AddAbortStep(&TaskManifestFile::stepAbortIconFiles);
} else {
AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
AddStep(&TaskManifestFile::stepCopyAccountIconFiles);
AddStep(&TaskManifestFile::stepCreateExecFile);
+ AddStep(&TaskManifestFile::stepCreateLinkNPPluginsFile);
AddStep(&TaskManifestFile::stepGenerateManifest);
}
}
"Widget execfile creation Finished");
}
+void TaskManifestFile::stepCreateLinkNPPluginsFile()
+{
+ _D("stepCreateLinkNPPluginsFile");
+ if (0 == access(m_context.locations->getNPPluginsDir().c_str(), F_OK)) {
+ _D("This webapp has NPPlugins");
+ std::string pluginsExec = "/usr/bin/PluginProcess";
+ errno = 0;
+ if (symlink(pluginsExec.c_str(),
+ m_context.locations->getNPPluginsExecFile().c_str()) != 0) {
+ int error = errno;
+ if (error) {
+ _E("Failed to create symbolic link for npplugins : %ls",
+ DPL::GetErrnoString(error).c_str());
+ }
+ }
+ }
+}
+
void TaskManifestFile::stepCopyIconFiles()
{
_D("CopyIconFiles");
void stepCopyLiveboxFiles();
void stepCopyAccountIconFiles();
void stepGenerateManifest();
+ void stepCreateLinkNPPluginsFile();
void stepAbortParseManifest();
AddStep(&TaskSmack::StepSetInstall);
AddStep(&TaskSmack::StepSmackFolderLabeling);
AddStep(&TaskSmack::StepSmackPrivilege);
+ AddStep(&TaskSmack::StepAddLabelNPRuntime);
AddStep(&TaskSmack::EndStep);
AddAbortStep(&TaskSmack::StepAbortSmack);
#endif
}
+void TaskSmack::StepAddLabelNPRuntime()
+{
+ _D("----------------> SMACK:\
+ Jobs::WidgetInstall::TaskSmack::StepAddLabelNPRuntime()");
+ if (0 == access(m_context.locations->getNPPluginsDir().c_str(), F_OK)) {
+ if (PC_OPERATION_SUCCESS !=
+ perm_app_setup_path(DPL::ToUTF8String(m_context.widgetConfig.tzPkgid).c_str(),
+ m_context.locations->getNPPluginsExecFile().c_str(),
+ PERM_APP_PATH_NPRUNTIME)) {
+ _E("failed to set smack execute label to %s",
+ m_context.locations->getNPPluginsExecFile().c_str());
+ }
+ }
+}
+
void TaskSmack::StepRevokeForUpdate()
{
_D("----------------> SMACK:\
void StepSetInstall();
void StepSmackFolderLabeling();
void StepSmackPrivilege();
+ void StepAddLabelNPRuntime();
void StepRevokeForUpdate();
void StepAbortSmack();
{
return getBackupSharedDir() + "/trusted";
}
+
+std::string WidgetLocation::getNPPluginsExecFile() const
+{
+ return getBinaryDir() + "/" + m_appid + ".npruntime";
+}
+
+std::string WidgetLocation::getNPPluginsDir() const
+{
+ return getSourceDir() + "/plugins";
+}
std::string getBackupSharedDir() const; // /opt/usr/apps/[package].backup/shared
std::string getBackupSharedDataDir() const; // /opt/usr/apps/[package].backup/shared/data
std::string getBackupSharedTrustedDir() const; // /opt/usr/apps/[package].backup/shared/trusted
+ std::string getNPPluginsDir() const; // /opt/usr/apps/[package]/res/wgt/plugins
+ std::string getNPPluginsExecFile() const; // /opt/usr/apps/[package]/bin/{execfile}
// Temporary paths
/**