!328 修复代码静态检查(0719)

Merge pull request !328 from Mupceet/codex
This commit is contained in:
openharmony_ci 2022-07-25 03:54:15 +00:00 committed by Gitee
commit 86c93499e2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 7 additions and 7 deletions

View File

@ -26,9 +26,9 @@ void LoadExtendLib(AppSpawnContent *content)
#endif
APPSPAWN_LOGI("MainThread::LoadAbilityLibrary. Start calling dlopen acelibdir.");
#ifndef APPSPAWN_TEST
void *AceAbilityLib = NULL;
AceAbilityLib = dlopen(acelibdir, RTLD_NOW | RTLD_GLOBAL);
APPSPAWN_CHECK(AceAbilityLib != NULL, return, "Fail to dlopen %s, [%s]", acelibdir, dlerror());
void *aceAbilityLib = NULL;
aceAbilityLib = dlopen(acelibdir, RTLD_NOW | RTLD_GLOBAL);
APPSPAWN_CHECK(aceAbilityLib != NULL, return, "Fail to dlopen %s, [%s]", acelibdir, dlerror());
#endif
APPSPAWN_LOGI("Success to dlopen %s", acelibdir);
APPSPAWN_LOGI("MainThread::LoadAbilityLibrary. End calling dlopen");

View File

@ -34,6 +34,7 @@ void SetAppAccessToken(struct AppSpawnContent_ *content, AppSpawnClient *client)
void SetSelinuxCon(struct AppSpawnContent_ *content, AppSpawnClient *client)
{
#ifdef WITH_SELINUX
UNUSED(content);
AppSpawnClientExt *appProperty = (AppSpawnClientExt *)client;
HapContext hapContext;
int32_t ret = hapContext.HapDomainSetcontext(appProperty->property.apl, appProperty->property.processName);

View File

@ -99,6 +99,7 @@ APPSPAWN_STATIC void AddAppInfo(pid_t pid, const char *processName)
APPSPAWN_STATIC void ProcessTimer(const TimerHandle taskHandle, void *context)
{
UNUSED(context);
APPSPAWN_LOGI("timeout stop appspawn");
LE_StopLoop(LE_GetDefaultLoop());
}

View File

@ -360,15 +360,13 @@ int SandboxUtils::DoAllMntPointsMount(const ClientSocket::AppProperty *appProper
{
std::string bundleName = appProperty->bundleName;
if (appConfig.find(MOUNT_PREFIX) == appConfig.end()) {
APPSPAWN_LOGV("mount config is not found, maybe reuslt sandbox launch failed"
"app name is %s", bundleName.c_str());
APPSPAWN_LOGV("mount config is not found, app name is %s", bundleName.c_str());
return 0;
}
bool checkFlag = false;
if (appConfig.find(FLAGS) != appConfig.end()) {
std::string flagsStr = appConfig[FLAGS].get<std::string>();
if ((ConvertFlagStr(flagsStr) & appProperty->flags) &&
if ((ConvertFlagStr(appConfig[FLAGS].get<std::string>()) & appProperty->flags) &&
bundleName.find("wps") != std::string::npos) {
checkFlag = true;
}