Home
last modified time | relevance | path

Searched refs:perm (Results 1 – 25 of 34) sorted by relevance

12

/system/sepolicy/tools/
Dsepolicy-check.c57 int check_perm(avtab_ptr_t current, perm_datum_t *perm) { in check_perm() argument
58 uint16_t perm_bitmask = 1U << (perm->s.value - 1); in check_perm()
66 perm_datum_t *perm, policydb_t *policy, avtab_t *avtab) { in expand_and_check() argument
89 match &= check_perm(cur, perm); in expand_and_check()
120 perm_datum_t *perm = NULL; in check_rule() local
152 perm = hashtab_search(cls->permissions.table, p); in check_rule()
153 if (perm == NULL) { in check_rule()
158 perm = hashtab_search(cls->comdatum->permissions.table, p); in check_rule()
159 if (perm == NULL) { in check_rule()
177 perm, policy, &policy->te_avtab); in check_rule()
[all …]
/system/security/keystore2/selinux/src/
Dlib.rs83 pub fn perm() -> Self { in perm() method
287 pub fn check_access(source: &CStr, target: &CStr, tclass: &str, perm: &str) -> Result<()> { in check_access()
293 let c_perm = CString::new(perm).with_context(|| { in check_access()
294 format!("check_access: Failed to convert perm \"{}\" to CString.", perm) in check_access()
312 io::ErrorKind::PermissionDenied => Err(anyhow!(Error::perm())), in check_access()
321 source, target, tclass, perm in check_access()
641 pub fn check_permission<T: ClassPermission>(source: &CStr, target: &CStr, perm: T) -> Result<()> { in check_permission()
642 check_access(source, target, perm.class_name(), perm.name()) in check_permission()
696 mod perm { module
714 ($perm:ident, $privileged:expr) => {
[all …]
Dconcurrency_test.rs102 let (tctx, sctx, perm, class) = ( in test_concurrent_check_access()
113 check_access(&sctx, &tctx, class, perm).unwrap(); in test_concurrent_check_access()
/system/tools/aidl/
Dpermission.h28 namespace perm {
43 ret += android::aidl::perm::JavaFullName(operands[i]); in JavaAnnotation()
58 ret += android::aidl::perm::JavaFullName(operands[i]); in JavaAnnotation()
Dpermission.cpp27 namespace perm { namespace
Daidl_language.cpp336 Result<unique_ptr<android::aidl::perm::Expression>> AidlAnnotation::EnforceExpression() const { in EnforceExpression()
341 return std::make_unique<android::aidl::perm::Expression>(single.value()); in EnforceExpression()
343 auto v = android::aidl::perm::AnyOf{anyOf.value()}; in EnforceExpression()
344 return std::make_unique<android::aidl::perm::Expression>(v); in EnforceExpression()
346 auto v = android::aidl::perm::AllOf{allOf.value()}; in EnforceExpression()
347 return std::make_unique<android::aidl::perm::Expression>(v); in EnforceExpression()
506 std::unique_ptr<android::aidl::perm::Expression> AidlAnnotatable::EnforceExpression() const { in EnforceExpression()
Dgenerate_java_binder.cpp511 void operator()(const perm::AllOf& quantifier) { in operator ()()
515 permissions.push_back(android::aidl::perm::JavaFullName(permission)); in operator ()()
523 void operator()(const perm::AnyOf& quantifier) { in operator ()()
527 permissions.push_back(android::aidl::perm::JavaFullName(permission)); in operator ()()
536 auto permissionName = android::aidl::perm::JavaFullName(permission); in operator ()()
/system/sepolicy/tests/
Dsepolicy_tests.py234 for perm in permissions:
235 tctx, tclass, p = perm.split(":")
243 violated_permissions += [perm]
250 basePermissionSet = set([":".join([rule.tctx, rule.tclass, perm])
251 for rule in baseRules for perm in rule.perms])
255 typePermissionSet = set([":".join([rule.tctx, rule.tclass, perm])
256 for rule in currentTypeRule for perm in rule.perms
260 for perm in violated_permissions:
261 ret += "allow %s %s:%s %s \n" % (subType, *perm.split(":"))
Dapex_sepolicy_tests.py75 perm: str
115 case AllowPerm(tclass, scontext, perm):
121 perms={perm}))
/system/hwservicemanager/
DAccessControl.cpp95 …sion(const CallingContext& source, const char *targetContext, const char *perm, const char *interf… in checkPermission() argument
108 perm, (void *) &ad) == 0); in checkPermission()
113 bool AccessControl::checkPermission(const CallingContext& source, const char *perm, const char *int… in checkPermission() argument
123 allowed = checkPermission(source, targetContext, perm, interface); in checkPermission()
DAccessControl.h43 …bool checkPermission(const CallingContext& source, const char *targetContext, const char *perm, co…
44 bool checkPermission(const CallingContext& source, const char *perm, const char *interface);
/system/core/init/
Ddevices_test.cpp228 EXPECT_EQ(0666U, permissions.perm()); in TEST()
241 EXPECT_EQ(0666U, permissions.perm()); in TEST()
255 EXPECT_EQ(0666U, permissions.perm()); in TEST()
272 EXPECT_EQ(0666U, permissions.perm()); in TEST()
289 EXPECT_EQ(0666U, permissions.perm()); in TEST()
300 EXPECT_EQ(0660U, permissions.perm()); in TEST()
314 EXPECT_EQ(0660U, permissions.perm()); in TEST()
326 EXPECT_EQ(0660U, permissions.perm()); in TEST()
Ddevices.h41 Permissions(const std::string& name, mode_t perm, uid_t uid, gid_t gid, bool no_fnm_pathname);
45 mode_t perm() const { return perm_; } in perm() function
66 SysfsPermissions(const std::string& name, const std::string& attribute, mode_t perm, uid_t uid, in SysfsPermissions() argument
68 : Permissions(name, perm, uid, gid, no_fnm_pathname), attribute_(attribute) {} in SysfsPermissions()
Ddevices.cpp128 Permissions::Permissions(const std::string& name, mode_t perm, uid_t uid, gid_t gid, in Permissions() argument
131 perm_(perm), in Permissions()
178 << perm(); in SetPermissions()
185 if (chmod(attribute_file.c_str(), perm()) != 0) { in SetPermissions()
186 PLOG(ERROR) << "chmod(" << attribute_file << ", " << perm() << ") failed"; in SetPermissions()
277 return {it->perm(), it->uid(), it->gid()}; in GetDevicePermissions()
Dueventd_parser.cpp54 mode_t perm = strtol(perm_string.c_str(), &end_pointer, 8); in ParsePermissionsLine() local
83 out_sysfs_permissions->emplace_back(name, sysfs_attribute, perm, uid, gid, no_fnm_pathname); in ParsePermissionsLine()
85 out_dev_permissions->emplace_back(name, perm, uid, gid, no_fnm_pathname); in ParsePermissionsLine()
Dservice_utils.h62 int perm = 0; member
Dutil.h48 mode_t perm, uid_t uid, gid_t gid, const std::string& socketcon);
Dutil.cpp96 mode_t perm, uid_t uid, gid_t gid, const std::string& socketcon) { in CreateSocket() argument
148 if (fchmodat(AT_FDCWD, addr.sun_path, perm, AT_SYMLINK_NOFOLLOW)) { in CreateSocket()
156 << ", mode " << std::oct << perm << std::dec in CreateSocket()
Dservice_utils.cpp171 auto result = CreateSocket(name, type | SOCK_CLOEXEC, passcred, listen, perm, uid, gid, in Create()
/system/security/keystore2/src/
Dpermission.rs181 mod perm { module
256 type IntoIter = perm::IntoIter;
265 pub fn check_keystore_permission(caller_ctx: &CStr, perm: KeystorePerm) -> anyhow::Result<()> { in check_keystore_permission()
267 selinux::check_permission(caller_ctx, &target_context, perm) in check_keystore_permission()
299 return Err(selinux::Error::perm()).context("Grant permission cannot be granted."); in check_grant_permission()
334 perm: KeyPerm, in check_key_permission()
346 if access_vector.includes(perm) { in check_key_permission()
355 return Err(selinux::Error::perm()) in check_key_permission()
365 return Err(selinux::Error::perm()) in check_key_permission()
366 .context(format!("\"{}\" not granted", perm.name())); in check_key_permission()
[all …]
Dutils.rs59 pub fn check_keystore_permission(perm: KeystorePerm) -> anyhow::Result<()> { in check_keystore_permission()
65 perm, in check_keystore_permission()
89 perm: KeyPerm, in check_key_permission()
99 perm, in check_key_permission()
Derror.rs66 pub fn perm() -> Self { in perm() method
270 Err(anyhow!(selinux::Error::perm())).context("nested nexted selinux permission denied") in nested_nested_selinux_perm()
/system/sepolicy/tools/sepolicy-analyze/
Dneverallow.c189 perm_datum_t *perm = NULL; in read_classperms() local
336 perm = hashtab_search(cls->permissions.table, id); in read_classperms()
337 if (cls->comdatum && !perm) in read_classperms()
338 perm = hashtab_search(cls->comdatum->permissions.table, id); in read_classperms()
339 if (!perm) { in read_classperms()
344 node->data |= 1U << (perm->s.value - 1); in read_classperms()
DAndroid.bp17 "perm.c",
/system/security/keystore2/src/fuzzers/
Dkeystore2_unsafe_fuzzer.rs118 perm: &'a str,
222 FuzzCommand::CheckAccess { source, target, tclass, perm } => {
229 perm,

12