Home
last modified time | relevance | path

Searched refs:hapFileInfo (Results 1 – 6 of 6) sorted by relevance

/ohos5.0/base/security/selinux_adapter/interfaces/policycoreutils/src/
H A Dhap_restorecon.cpp267 int HapContext::HapFileRestorecon(HapFileInfo& hapFileInfo) in HapFileRestorecon() argument
269 if (hapFileInfo.apl.empty() || hapFileInfo.pathNameOrig.empty() || !CheckApl(hapFileInfo.apl)) { in HapFileRestorecon()
273 for (auto pathname : hapFileInfo.pathNameOrig) { in HapFileRestorecon()
274 int res = HapFileRestorecon(pathname.c_str(), hapFileInfo); in HapFileRestorecon()
285 if (hapFileInfo.apl.empty() || pathNameOrig.empty() || !CheckApl(hapFileInfo.apl)) { in HapFileRestorecon()
304 int res = GetSecontext(hapFileInfo, pathNameOrig, &newSecontext, &oldSecontext); in HapFileRestorecon()
322 int ret = RestoreconSb(realPath, hapFileInfo); in HapFileRestorecon()
328 return HapFileRecurseRestorecon(realPath, hapFileInfo); in HapFileRestorecon()
368 if (RestoreconSb(ftsent->fts_path, hapFileInfo) != 0) { in HapFileRecurseRestorecon()
383 int res = GetSecontext(hapFileInfo, pathNameOrig, &newSecontext, &oldSecontext); in RestoreconSb()
[all …]
/ohos5.0/base/security/selinux_adapter/interfaces/policycoreutils/include/
H A Dhap_restorecon.h60 int HapFileRestorecon(HapFileInfo& hapFileInfo);
65 int HapFileRestorecon(const std::string &pathNameOrig, HapFileInfo& hapFileInfo);
66 int HapFileRecurseRestorecon(const std::string &realPath, HapFileInfo& hapFileInfo);
67 int RestoreconSb(const std::string &pathNameOrig, HapFileInfo& hapFileInfo);
68 int GetSecontext(HapFileInfo& hapFileInfo, const std::string &pathNameOrig,
/ohos5.0/base/security/selinux_adapter/interfaces/tools/hap_restorecon/
H A Dtest.cpp135 HapFileInfo hapFileInfo = { in main() local
142 res = test.HapFileRestorecon(hapFileInfo); in main()
/ohos5.0/base/security/selinux_adapter/test/unittest/hap_restorecon/
H A Dunit_test.cpp423 HapFileInfo hapFileInfo = { variable
432 ASSERT_EQ(SELINUX_SUCC, test.HapFileRestorecon(hapFileInfo));
471 HapFileInfo hapFileInfo = { variable
478 ASSERT_EQ(SELINUX_SUCC, test.HapFileRestorecon(hapFileInfo));
/ohos5.0/base/startup/appspawn/modules/sandbox/
H A Dsandbox_utils.cpp408 HapFileInfo hapFileInfo; in MakeAtomicServiceDir() local
409 hapFileInfo.pathNameOrig.push_back(path); in MakeAtomicServiceDir()
410 hapFileInfo.apl = msgDomainInfo->apl; in MakeAtomicServiceDir()
411 hapFileInfo.packageName = GetBundleName(appProperty); in MakeAtomicServiceDir()
412 hapFileInfo.hapFlags = msgDomainInfo->hapFlags; in MakeAtomicServiceDir()
414 hapFileInfo.hapFlags |= SELINUX_HAP_DEBUGGABLE; in MakeAtomicServiceDir()
417 ret = hapContext.HapFileRestorecon(hapFileInfo); in MakeAtomicServiceDir()
419 path.c_str(), hapFileInfo.apl.c_str(), ret); in MakeAtomicServiceDir()
/ohos5.0/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/installd/
H A Dinstalld_host_impl.cpp1052 HapFileInfo hapFileInfo; in SetDirApl() local
1053 hapFileInfo.pathNameOrig.push_back(dir); in SetDirApl()
1054 hapFileInfo.apl = apl; in SetDirApl()
1055 hapFileInfo.packageName = bundleName; in SetDirApl()
1056 hapFileInfo.flags = SELINUX_HAP_RESTORECON_RECURSE; in SetDirApl()
1057 hapFileInfo.hapFlags = hapFlags; in SetDirApl()
1059 int ret = hapContext.HapFileRestorecon(hapFileInfo); in SetDirApl()