Home
last modified time | relevance | path

Searched refs:apl (Results 1 – 25 of 86) sorted by relevance

1234

/base/security/selinux/interfaces/policycoreutils/include/
Dhap_restorecon.h29 std::string apl = ""; member
39 int HapFileRestorecon(std::vector<std::string> &pathNameOrig, const std::string &apl,
41 …int HapFileRestorecon(const std::string &pathNameOrig, const std::string &apl, const std::string &…
43 int HapDomainSetcontext(const std::string &apl, const std::string &packageName);
47 int RestoreconSb(const std::string &pathname, const struct stat *sb, const std::string &apl,
49 …int HapContextsLookup(bool isDomain, const std::string &apl, const std::string &packageName, conte…
50 int HapLabelLookup(const std::string &apl, const std::string &packageName, char **secontextPtr);
/base/security/selinux/interfaces/policycoreutils/src/
Dhap_restorecon.cpp99 contextBuff.apl = tmp.substr(tmp.find(APL_PREFIX) + APL_PREFIX.size()); in DecodeString()
126 static bool CheckApl(const std::string &apl) in CheckApl() argument
128 if (apl == "system_core" || apl == "system_basic" || apl == "normal") { in CheckApl()
147 if (!tmpInfo.apl.empty()) { in HapContextsLoad()
148 g_sehapContextsMap.emplace(tmpInfo.apl + tmpInfo.name, tmpInfo); in HapContextsLoad()
188 int HapContext::HapContextsLookup(bool isDomain, const std::string &apl, const std::string &package… in HapContextsLookup() argument
199 auto iter = g_sehapContextsMap.find(std::string(apl) + std::string(packageName)); in HapContextsLookup()
200 if (iter != g_sehapContextsMap.end() && apl != "normal") { in HapContextsLookup()
203 iter = g_sehapContextsMap.find(std::string(apl)); in HapContextsLookup()
211 int HapContext::HapLabelLookup(const std::string &apl, const std::string &packageName, char **secon… in HapLabelLookup() argument
[all …]
/base/security/device_auth/services/frameworks/src/permission_adapter/
Dpermission_adapter.cpp37 if ((findInfo.apl == APL_SYSTEM_CORE) || (findInfo.apl == APL_SYSTEM_BASIC)) { in CheckPermission()
41 … LOGE("Check permission(APL3=SYSTEM_CORE or APL2=SYSTEM_BASIC) failed! APL: %d", findInfo.apl); in CheckPermission()
/base/security/access_token/services/accesstokenmanager/main/cpp/src/token/
Dnative_token_info_inner.cpp37 tokenInfoBasic_.apl = APL_NORMAL; in NativeTokenInfoInner()
55 int apl, const std::vector<std::string>& dcap, in Init() argument
66 if (!DataValidator::IsAplNumValid(apl)) { in Init()
69 tokenInfoBasic_.tokenID, apl); in Init()
72 tokenInfoBasic_.apl = static_cast<ATokenAplEnum>(apl); in Init()
109 outGenericValues.Put(TokenFiledConst::FIELD_APL, tokenInfoBasic_.apl); in TranslationIntoGenericValues()
141 tokenInfoBasic_.apl = static_cast<ATokenAplEnum>(aplNum); in RestoreNativeTokenInfo()
163 infoParcel.apl = tokenInfoBasic_.apl; in TranslateToNativeTokenInfo()
258 info.append(R"( "apl": )" + std::to_string(tokenInfoBasic_.apl) + ",\n"); in ToString()
263 permPolicySet_->PermStateToString(tokenInfoBasic_.apl, tokenInfoBasic_.nativeAcls, info); in ToString()
Dhap_token_info_inner.cpp42 tokenInfoBasic_.apl = APL_NORMAL; in HapTokenInfoInner()
58 tokenInfoBasic_.apl = policy.apl; in HapTokenInfoInner()
80 tokenInfoBasic_.apl = policy.apl; in Update()
106 outGenericValues.Put(TokenFiledConst::FIELD_APL, tokenInfoBasic_.apl); in TranslationIntoGenericValues()
143 tokenInfoBasic_.apl = static_cast<ATokenAplEnum>(aplNum); in RestoreHapTokenBasicInfo()
265 info.append(R"( "apl": )" + std::to_string(tokenInfoBasic_.apl) + ",\n"); in ToString()
/base/security/access_token/frameworks/accesstoken/src/
Dhap_token_info_parcel.cpp24 RETURN_IF_FALSE(out.WriteInt32(this->hapTokenInfoParams.apl)); in Marshalling()
45 int apl; in Unmarshalling() local
47 RELEASE_IF_FALSE(in.ReadInt32(apl), hapTokenInfoParcel); in Unmarshalling()
48 hapTokenInfoParcel->hapTokenInfoParams.apl = ATokenAplEnum(apl); in Unmarshalling()
Dhap_policy_parcel.cpp30 RETURN_IF_FALSE(out.WriteInt32(this->hapPolicyParameter.apl)); in Marshalling()
63 int32_t apl; in Unmarshalling() local
64 RELEASE_IF_FALSE(in.ReadInt32(apl), hapPolicyParcel); in Unmarshalling()
65 hapPolicyParcel->hapPolicyParameter.apl = ATokenAplEnum(apl); in Unmarshalling()
Dnative_token_info_parcel.cpp29 RETURN_IF_FALSE(out.WriteInt32(this->nativeTokenInfoParams.apl)); in Marshalling()
65 int32_t apl; in Unmarshalling() local
67 RELEASE_IF_FALSE(in.ReadInt32(apl), nativeTokenInfoParcel); in Unmarshalling()
69 nativeTokenInfoParcel->nativeTokenInfoParams.apl = ATokenAplEnum(apl); in Unmarshalling()
/base/security/selinux/interfaces/tools/hap_restorecon/
Dtest.cpp37 std::string apl = ""; member
76 input.apl = optarg; in SetOptions()
130 …res = test.HapFileRestorecon(testCmd.path, testCmd.apl, testCmd.name, atoi(testCmd.recurse.c_str()… in main()
132 …res = test.HapFileRestorecon(testCmd.multiPath, testCmd.apl, testCmd.name, atoi(testCmd.recurse.c_… in main()
136 res = test.HapDomainSetcontext(testCmd.apl, testCmd.name); in main()
/base/security/access_token/frameworks/common/src/
Ddata_validator.cpp57 bool DataValidator::IsAplNumValid(const int apl) in IsAplNumValid() argument
59 return (apl == APL_NORMAL || apl == APL_SYSTEM_BASIC || apl == APL_SYSTEM_CORE); in IsAplNumValid()
/base/security/access_token/services/accesstokenmanager/test/unittest/cpp/src/
Dnative_token_receptor_test.cpp266 .apl = APL_NORMAL,
281 ASSERT_EQ(findInfo.apl, info.apl);
331 NativeTokenInfo info = {.apl = APL_NORMAL,
345 ASSERT_EQ(findInfo.apl, info.apl);
380 NativeTokenInfo info = {.apl = APL_NORMAL,
412 .apl = APL_NORMAL,
421 .apl = APL_SYSTEM_BASIC,
477 ASSERT_EQ(findInfo.apl, info1.apl);
493 ASSERT_EQ(findInfo.apl, info2.apl);
541 .apl = APL_NORMAL,
[all …]
/base/notification/distributed_notification_service/services/ans/src/
Daccess_token_helper.cpp48 … if (info.apl == ATokenAplEnum::APL_SYSTEM_CORE || info.apl == ATokenAplEnum::APL_SYSTEM_BASIC) { in IsSystemHap()
54 info.apl, type, pid, uid); in IsSystemHap()
/base/security/selinux/sepolicy/base/public/
Dsehap_contexts14 apl=system_core domain=system_core_hap type=system_core_hap_data_file
15 apl=system_basic domain=system_basic_hap type=system_basic_hap_data_file
16 apl=normal domain=normal_hap type=normal_hap_data_file
/base/powermgr/power_manager/utils/permission/src/
Dpermission.cpp35 static bool IsTokenAplMatch(ATokenAplEnum apl) in IsTokenAplMatch() argument
42 static_cast<int32_t>(apl), static_cast<int32_t>(type), pid, uid); in IsTokenAplMatch()
45 if (info.apl == apl) { in IsTokenAplMatch()
49 static_cast<int32_t>(info.apl), static_cast<int32_t>(type), pid, uid); in IsTokenAplMatch()
/base/startup/init/services/init/standard/
Dinit_service.c117 const char *apl = "system_basic"; in GetAccessToken() local
118 if (service->apl != NULL) { in GetAccessToken()
119 apl = service->apl; in GetAccessToken()
129 apl, in GetAccessToken()
/base/security/access_token/interfaces/innerkits/accesstoken/include/
Dhap_token_info.h40 ATokenAplEnum apl;
48 ATokenAplEnum apl;
/base/security/access_token/interfaces/innerkits/accesstoken/test/unittest/src/
Dremote_token_kit_test.cpp99 .apl = APL_NORMAL,
113 .apl = APL_NORMAL,
213 .apl = APL_NORMAL,
249 ASSERT_EQ(resultInfo.apl, remoteTokenInfo.baseInfo.apl);
278 .apl = APL_NORMAL,
290 wrongBaseInfo.apl = (ATokenAplEnum)11; // wrong apl
348 .apl = APL_NORMAL,
400 .apl = APL_NORMAL,
458 .apl = APL_NORMAL,
515 .apl = APL_NORMAL,
[all …]
/base/startup/appspawn/adapter/
Dappspawn_adapter.cpp44 …int32_t ret = hapContext.HapDomainSetcontext(appProperty->property.apl, appProperty->property.proc… in SetSelinuxCon()
47 errno, appProperty->property.apl); in SetSelinuxCon()
/base/security/access_token/services/tokensyncmanager/src/command/
Dbase_remote_command.cpp94 {"apl", tokenInfo.baseInfo.apl}, in ToNativeTokenInfoJson()
146 {"apl", tokenInfo.baseInfo.apl}, in ToHapTokenInfosJson()
183 int apl = hapTokenJson.at("apl").get<int>(); in FromHapTokenBasicInfoJson() local
184 if (DataValidator::IsAplNumValid(apl)) { in FromHapTokenBasicInfoJson()
185 hapTokenBasicInfo.apl = static_cast<ATokenAplEnum>(apl); in FromHapTokenBasicInfoJson()
253 int apl = nativeTokenJson.at("apl").get<int>(); in FromNativeTokenInfoJson() local
254 if (DataValidator::IsAplNumValid(apl)) { in FromNativeTokenInfoJson()
255 nativeTokenInfo.baseInfo.apl = static_cast<ATokenAplEnum>(apl); in FromNativeTokenInfoJson()
/base/security/access_token/interfaces/innerkits/nativetoken/src/
Dnativetoken_json_oper.c72 int32_t apl = cJSON_GetNumberValue(aplJson); in GetAplFromJson() local
73 if (apl <= 0 || apl > SYSTEM_CORE) { in GetAplFromJson()
74 AT_LOG_ERROR("[ATLIB-%s]:apl = %d in file is invalid.", __func__, apl); in GetAplFromJson()
77 tokenNode->apl = aplJson->valueint; in GetAplFromJson()
150 item = cJSON_CreateNumber(curr->apl); in SetNativeTokenJsonObject()
247 cJSON *itemApl = cJSON_CreateNumber(tokenNode->apl); in UpdateItemcontent()
Dnativetoken.c441 int32_t apl = GetAplLevel(tokenInfo->aplStr); in CheckProcessInfo() local
442 if (apl == 0) { in CheckProcessInfo()
445 *aplRet = apl; in CheckProcessInfo()
480 tokenNode->apl = aplIn; in AddNewTokenToListAndFile()
518 if (tokenNode->apl != aplIn) { in CompareTokenInfo()
570 tokenNode->apl = GetAplLevel(tokenInfo->aplStr); in UpdateTokenInfoInList()
630 int32_t apl; in GetAccessTokenId() local
636 uint32_t ret = CheckProcessInfo(tokenInfo, &apl); in GetAccessTokenId()
651 ret = AddNewTokenToListAndFile(tokenInfo, apl, &tokenId); in GetAccessTokenId()
653 … int32_t needTokenUpdate = CompareTokenInfo(tokenNode, tokenInfo->dcaps, tokenInfo->dcapsNum, apl); in GetAccessTokenId()
/base/security/appverify/interfaces/innerkits/appverify/test/unittest/src/
Dprovision_verify_test.cpp53 "apl": "normal",
93 "apl": "normal",
113 "apl": "normal",
138 "apl": "normal",
161 "apl": "normal",
185 "apl": "normal",
417 "apl": "normal",
466 "apl": "normal",
516 "apl": "normal",
/base/usb/usb_manager/services/
Dusb_service.cfg8 "apl" : "system_basic",
/base/security/access_token/services/accesstokenmanager/main/cpp/include/token/
Dnative_token_info_inner.h40 int Init(AccessTokenID id, const std::string& processName, int apl,
53 int apl, const std::vector<std::string>& dcap,
/base/security/access_token/frameworks/test/unittest/
Daccesstoken_parcel_test.cpp135 hapPolicyParcel.hapPolicyParameter.apl = ATokenAplEnum::APL_NORMAL;
148 EXPECT_EQ(hapPolicyParcel.hapPolicyParameter.apl, readedData->hapPolicyParameter.apl);
250 hapTokenInfo.apl = ATokenAplEnum::APL_NORMAL;
281 hapTokenInfo.apl = ATokenAplEnum::APL_NORMAL;
340 baseInfo.apl = APL_NORMAL,
395 baseInfo.apl = APL_NORMAL,
532 nativeTokenInfoParcel.nativeTokenInfoParams.apl = APL_NORMAL;
556 nativeTokenInfoParcel.nativeTokenInfoParams.apl = APL_NORMAL;
578 nativeTokenInfoParcel.nativeTokenInfoParams.apl = APL_NORMAL;

1234