diff options
author | 조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com> | 2020-09-28 09:43:42 +0900 |
---|---|---|
committer | 이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2020-09-28 09:43:42 +0900 |
commit | 44165da4d21313a1d388c858a008af7055f20adc (patch) | |
tree | 992b66772bb57d771d4317d64cd445c1d1b95357 | |
parent | b0b4c44d8e0b8f711eb5e9130fba88eaa9a8917e (diff) | |
download | launcher-tizen_6.0_hotfix.tar.gz launcher-tizen_6.0_hotfix.tar.bz2 launcher-tizen_6.0_hotfix.zip |
Add missing smack label setting for preloaded app (#286)tizen_6.0.m2_releasesubmit/tizen_6.0_hotfix/20201103.114803submit/tizen_6.0_hotfix/20201102.192503submit/tizen_6.0/20201029.205103submit/tizen/20201005.025011accepted/tizen/unified/20201005.101327accepted/tizen/6.0/unified/hotfix/20201103.050913accepted/tizen/6.0/unified/20201030.120828tizen_6.0_hotfixaccepted/tizen_6.0_unified_hotfix
In the case of preload app installation, the smack label may not be changed automatically.
This patch add that kind of missing smack label setting
-rw-r--r-- | NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc b/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc index 2e80c2c..f241865 100644 --- a/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc +++ b/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc @@ -120,6 +120,7 @@ static bool copyAssemblyCreateSymlink(std::string binPath, std::string tacDir, s } } bf::create_symlink(concatPath(tac_version_dir, assembly), concatPath(tacDir, assembly)); + copySmackAndOwnership(tacDir, concatPath(tacDir, assembly), true); if (!removeFile(concatPath(binPath, assembly))) { _ERR("Failed to remove of %s", assembly.c_str()); @@ -137,6 +138,7 @@ static bool copyAssemblyCreateSymlink(std::string binPath, std::string tacDir, s std::string assembly = nuget_package_assembly.substr(nuget_package_assembly.rfind(':') + 1); if (!strcmp(nuget_package.c_str(), nugetPackage.c_str())) { copyFile(concatPath(tac_version_dir, assembly), concatPath(binPath, assembly)); + copySmackAndOwnership(binPath, concatPath(binPath, assembly)); removeFile(concatPath(tacDir, assembly)); } } @@ -173,12 +175,14 @@ static void copyLibraryCreateSymlink(const char* pkgId, std::vector<std::string> continue; } bf::create_symlink(concatPath(tlcDir, fileSha), library); + copySmackAndOwnership(getBaseName(library), library, true); char *sql = sqlite3_mprintf("INSERT INTO TLC (PKGID, LIBRARY) VALUES (%Q, %Q);", pkgId, fileSha.c_str()); if (!insertDB(tlc_db, sql)) { _ERR("Sqlite insert error"); sqlite3_free(sql); copyFile(concatPath(tlcDir, fileSha), library); + copySmackAndOwnership(getBaseName(library), library); if (fileCopied) { removeFile(concatPath(tlcDir, fileSha)); } |