Home
last modified time | relevance | path

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

/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/bt/stack/gatt/
Dgatt_db.cc42 tGATT_PERM perm);
85 tGATT_PERM perm = attr.permission; in gatts_check_attr_readability() local
87 min_key_size = (((perm & GATT_ENCRYPT_KEY_SIZE_MASK) >> 12)); in gatts_check_attr_readability()
92 if (!(perm & GATT_READ_ALLOWED)) { in gatts_check_attr_readability()
97 if ((perm & GATT_READ_AUTH_REQUIRED) && in gatts_check_attr_readability()
104 if ((perm & GATT_READ_MITM_REQUIRED) && in gatts_check_attr_readability()
110 if ((perm & GATT_READ_ENCRYPTED_REQUIRED) && in gatts_check_attr_readability()
116 if ((perm & GATT_READ_ENCRYPTED_REQUIRED) && in gatts_check_attr_readability()
367 uint16_t gatts_add_characteristic(tGATT_SVC_DB& db, tGATT_PERM perm, in gatts_add_characteristic() argument
372 VLOG(1) << StringPrintf("%s: perm=0x%0x property=0x%0x", __func__, perm, in gatts_add_characteristic()
[all …]
Dgatt_int.h568 extern uint16_t gatts_add_characteristic(tGATT_SVC_DB& db, tGATT_PERM perm,
571 extern uint16_t gatts_add_char_descr(tGATT_SVC_DB& db, tGATT_PERM perm,
/system/security/keystore/
Dpermissions.cpp83 const char* get_perm_label(perm_t perm) { in get_perm_label() argument
84 unsigned int index = ffs(perm); in get_perm_label()
120 static bool keystore_selinux_check_access(uid_t uid, perm_t perm, pid_t spid) { in keystore_selinux_check_access() argument
124 const char* str_perm = get_perm_label(perm); in keystore_selinux_check_access()
160 bool has_permission(uid_t uid, perm_t perm, pid_t spid) { in has_permission() argument
169 return (user.perms & perm) && keystore_selinux_check_access(uid, perm, spid); in has_permission()
173 return (DEFAULT_PERMS & perm) && keystore_selinux_check_access(uid, perm, spid); in has_permission()
Dpermissions.h45 const char* get_perm_label(perm_t perm);
54 bool has_permission(uid_t uid, perm_t perm, pid_t spid);
/system/core/init/
Ddescriptors.cpp38 gid_t gid, int perm, const std::string& context) in DescriptorInfo() argument
39 : name_(name), type_(type), uid_(uid), gid_(gid), perm_(perm), context_(context) { in DescriptorInfo()
75 gid_t gid, int perm, const std::string& context) in SocketInfo() argument
76 : DescriptorInfo(name, type, uid, gid, perm, context) { in SocketInfo()
89 return CreateSocket(name().c_str(), flags, passcred, perm(), uid(), gid(), context.c_str(), in Create()
98 gid_t gid, int perm, const std::string& context) in FileInfo() argument
100 : DescriptorInfo(name, type, uid, gid, perm, context) { in FileInfo()
Ddescriptors.h31 gid_t gid, int perm, const std::string& context);
45 int perm() const { return perm_; } in perm() function
65 gid_t gid, int perm, const std::string& context);
75 gid_t gid, int perm, const std::string& context);
Ddevices_test.cpp230 EXPECT_EQ(0666U, permissions.perm()); in TEST()
243 EXPECT_EQ(0666U, permissions.perm()); in TEST()
257 EXPECT_EQ(0666U, permissions.perm()); in TEST()
273 EXPECT_EQ(0666U, permissions.perm()); in TEST()
283 EXPECT_EQ(0660U, permissions.perm()); in TEST()
297 EXPECT_EQ(0660U, permissions.perm()); in TEST()
309 EXPECT_EQ(0660U, permissions.perm()); in TEST()
Ddevices.h37 Permissions(const std::string& name, mode_t perm, uid_t uid, gid_t gid);
41 mode_t perm() const { return perm_; } in perm() function
59 SysfsPermissions(const std::string& name, const std::string& attribute, mode_t perm, uid_t uid, in SysfsPermissions() argument
61 : Permissions(name, perm, uid, gid), attribute_(attribute) {} in SysfsPermissions()
Dueventd_parser.cpp50 mode_t perm = strtol(perm_string.c_str(), &end_pointer, 8); in ParsePermissionsLine() local
73 out_sysfs_permissions->emplace_back(name, sysfs_attribute, perm, uid, gid); in ParsePermissionsLine()
75 out_dev_permissions->emplace_back(name, perm, uid, gid); in ParsePermissionsLine()
Ddevices.cpp104 Permissions::Permissions(const std::string& name, mode_t perm, uid_t uid, gid_t gid) in Permissions() argument
105 : name_(name), perm_(perm), uid_(uid), gid_(gid), prefix_(false), wildcard_(false) { in Permissions()
147 << perm(); in SetPermissions()
154 if (chmod(attribute_file.c_str(), perm()) != 0) { in SetPermissions()
155 PLOG(ERROR) << "chmod(" << attribute_file << ", " << perm() << ") failed"; in SetPermissions()
215 return {it->perm(), it->uid(), it->gid()}; in GetDevicePermissions()
Dutil.cpp91 int CreateSocket(const char* name, int type, bool passcred, mode_t perm, uid_t uid, gid_t gid, in CreateSocket() argument
150 if (fchmodat(AT_FDCWD, addr.sun_path, perm, AT_SYMLINK_NOFOLLOW)) { in CreateSocket()
156 << ", mode " << std::oct << perm << std::dec in CreateSocket()
Dutil.h39 int CreateSocket(const char* name, int type, bool passcred, mode_t perm, uid_t uid, gid_t gid,
Dservice.cpp548 int perm = args.size() > 3 ? std::strtoul(args[3].c_str(), 0, 8) : -1; in AddDescriptor() local
568 auto descriptor = std::make_unique<T>(args[1], args[2], uid, gid, perm, context); in AddDescriptor()
DREADME.md178 `socket <name> <type> <perm> [ <user> [ <group> [ <seclabel> ] ] ]`
/system/hwservicemanager/
DAccessControl.cpp77 …sion(const CallingContext& source, const char *targetContext, const char *perm, const char *interf… in checkPermission() argument
90 perm, (void *) &ad) == 0); in checkPermission()
95 bool AccessControl::checkPermission(const CallingContext& source, const char *perm, const char *int… in checkPermission() argument
105 allowed = checkPermission(source, targetContext, perm, interface); in checkPermission()
DAccessControl.h25 …bool checkPermission(const CallingContext& source, const char *targetContext, const char *perm, co…
26 bool checkPermission(const CallingContext& source, const char *perm, const char *interface);
/system/extras/librank/
Dlibrank.c174 static int parse_perm(const char *perm) in parse_perm() argument
178 while (*perm) { in parse_perm()
179 switch(*perm) { in parse_perm()
190 fprintf(stderr, "Unknown permission '%c'\n", *perm); in parse_perm()
193 perm++; in parse_perm()
220 int perm; in main() local
233 perm = 0; in main()
281 perm = parse_perm(optarg); in main()
353 if (perm && (pm_map_flags(maps[j]) & PM_MAP_PERMISSIONS) != perm) in main()
/system/sepolicy/tools/sepolicy-analyze/
Dneverallow.c189 perm_datum_t *perm = NULL; in read_classperms() local
333 perm = hashtab_search(cls->permissions.table, id); in read_classperms()
334 if (cls->comdatum && !perm) in read_classperms()
335 perm = hashtab_search(cls->comdatum->permissions.table, id); in read_classperms()
336 if (!perm) { in read_classperms()
341 node->data |= 1U << (perm->s.value - 1); in read_classperms()
DAndroid.mk9 LOCAL_SRC_FILES := sepolicy-analyze.c dups.c neverallow.c perm.c typecmp.c booleans.c attribute.c u…
/system/core/sdcard/
Dfuse.h115 perm_t perm; member
Dfuse.cpp210 if (node->perm == PERM_PRE_ROOT) { in attr_from_stat()
249 node->perm = PERM_INHERIT; in derive_permissions_locked()
255 switch (parent->perm) { in derive_permissions_locked()
261 node->perm = PERM_ROOT; in derive_permissions_locked()
268 node->perm = PERM_ANDROID; in derive_permissions_locked()
275 node->perm = PERM_ANDROID_DATA; in derive_permissions_locked()
278 node->perm = PERM_ANDROID_OBB; in derive_permissions_locked()
284 node->perm = PERM_ANDROID_MEDIA; in derive_permissions_locked()
316 if (parent_node && parent_node->perm == PERM_ROOT) { in check_caller_access_to_name()
780 if (parent_node->perm == PERM_ANDROID && !strcasecmp(name, "data")) { in handle_mkdir()
[all …]
Dsdcard.cpp255 global.root.perm = PERM_PRE_ROOT; in run()
258 global.root.perm = PERM_ROOT; in run()
/system/core/liblog/tests/
Dliblog_test.cpp1911 bool perm = (gid == AID_ROOT) || (uid == AID_ROOT); in TEST() local
1912 EXPECT_STREQ(perm ? "TRUE" : persist_hold, persist); in TEST()
1920 EXPECT_STREQ(perm ? "FALSE" : persist_hold, persist); in TEST()
1928 EXPECT_STREQ(perm ? "true" : persist_hold, persist); in TEST()
1936 EXPECT_STREQ(perm ? "false" : persist_hold, persist); in TEST()
1944 EXPECT_STREQ(perm ? "" : persist_hold, persist); in TEST()
/system/keymaster/
Docb.c230 const vector unsigned char perm = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0}; in double_block() local
236 t = vec_perm(t, t, perm); in double_block()