/third_party/selinux/libselinux/src/ |
H A D | mapping.c | 23 access_vector_t perms[sizeof(access_vector_t) * 8]; member 83 while (p_in->perms[k]) { in selinux_set_mapping() 85 if (!*p_in->perms[k]) { in selinux_set_mapping() 89 p_out->perms[k] = string_to_av_perm(p_out->value, in selinux_set_mapping() 90 p_in->perms[k]); in selinux_set_mapping() 91 if (!p_out->perms[k]) { in selinux_set_mapping() 94 p_in->perms[k], p_in->name); in selinux_set_mapping() 148 kperm |= current_mapping[tclass].perms[i]; in unmap_perm() 193 if (kperm & current_mapping[tclass].perms[i]) { in map_perm() 195 kperm &= ~current_mapping[tclass].perms[ in map_perm() [all...] |
H A D | avc.c | 43 security_class_t tclass, access_vector_t perms, 49 access_vector_t perms; member 912 access_vector_t perms, in avc_add_callback() 916 security_class_t tclass, access_vector_t perms) in avc_add_callback() 932 c->perms = perms; in avc_add_callback() 945 access_vector_t perms) in avc_update_node() 949 node->ae.avd.allowed |= perms; in avc_update_node() 953 node->ae.avd.allowed &= ~perms; in avc_update_node() 956 node->ae.avd.auditallow |= perms; in avc_update_node() 909 avc_add_callback(int (*callback) (uint32_t event, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, access_vector_t * out_retained), uint32_t events, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms) avc_add_callback() argument 944 avc_update_node(uint32_t event, struct avc_node *node, access_vector_t perms) avc_update_node() argument 970 avc_update_cache(uint32_t event, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms) avc_update_cache() argument 1008 avc_control(uint32_t event, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, uint32_t seqno, access_vector_t * out_retained) avc_control() argument 1068 avc_ss_grant(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, uint32_t seqno) avc_ss_grant() argument 1089 avc_ss_try_revoke(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, uint32_t seqno, access_vector_t * out_retained) avc_ss_try_revoke() argument 1109 avc_ss_revoke(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, uint32_t seqno) avc_ss_revoke() argument 1144 avc_ss_set_auditallow(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, uint32_t seqno, uint32_t enable) avc_ss_set_auditallow() argument 1165 avc_ss_set_auditdeny(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, uint32_t seqno, uint32_t enable) avc_ss_set_auditdeny() argument [all...] |
H A D | stringrep.c | 25 char **perms; member 74 /* allocate array for perms */ in discover_class() 75 node->perms = calloc(MAXVECTORS,sizeof(char*)); in discover_class() 76 if (node->perms == NULL) in discover_class() 103 ret = snprintf(path, sizeof path, "%s/class/%s/perms",selinux_mnt,s); in discover_class() 116 ret = snprintf(path, sizeof path, "%s/class/%s/perms/%s", selinux_mnt,s,dentry->d_name); in discover_class() 147 node->perms[value-1] = strdup(dentry->d_name); in discover_class() 148 if (node->perms[value-1] == NULL) in discover_class() 163 free(node->perms[i]); in discover_class() 167 free(node->perms); in discover_class() [all...] |
H A D | avc_internal.h | 166 security_class_t tclass, access_vector_t perms, 170 access_vector_t perms, uint32_t seqno, 173 security_class_t tclass, access_vector_t perms, 177 security_class_t tclass, access_vector_t perms, 180 security_class_t tclass, access_vector_t perms,
|
/third_party/selinux/libsepol/src/ |
H A D | assertion.c | 49 const class_perm_node_t *curperm, uint32_t perms) in report_failure() 57 sepol_av_to_string(p, curperm->tclass, perms)); in report_failure() 63 sepol_av_to_string(p, curperm->tclass, perms)); in report_failure() 69 sepol_av_to_string(p, curperm->tclass, perms)); in report_failure() 99 rc = extended_permissions_and(neverallow->perms, allow->perms); in check_extended_permissions() 102 rc = xperm_test(neverallow->driver, allow->perms); in check_extended_permissions() 105 rc = xperm_test(allow->driver, neverallow->perms); in check_extended_permissions() 108 rc = extended_permissions_and(neverallow->perms, allow->perms); in check_extended_permissions() 47 report_failure(sepol_handle_t *handle, policydb_t *p, const avrule_t *avrule, unsigned int stype, unsigned int ttype, const class_perm_node_t *curperm, uint32_t perms) report_failure() argument 145 report_assertion_extended_permissions(sepol_handle_t *handle, policydb_t *p, const avrule_t *avrule, unsigned int stype, unsigned int ttype, const class_perm_node_t *curperm, uint32_t perms, avtab_key_t *k, avtab_t *avtab) report_assertion_extended_permissions() argument 221 uint32_t perms; report_assertion_avtab_matches() local [all...] |
H A D | util.c | 150 for (bit = 0; bit < sizeof(xperms->perms)*8; bit++) { in sepol_extended_perms_to_string() 151 if (!xperm_test(bit, xperms->perms)) in sepol_extended_perms_to_string() 154 if (in_range && next_bit_in_range(bit, xperms->perms)) { in sepol_extended_perms_to_string() 157 } else if (next_bit_in_range(bit, xperms->perms)) { in sepol_extended_perms_to_string()
|
H A D | kernel_to_cil.c | 284 char *perms; in class_constraint_rules_to_strs() local 298 perms = sepol_av_to_string(pdb, class->s.value, curr->permissions); in class_constraint_rules_to_strs() 308 rc = strs_create_and_add(strs, "(%s (%s (%s)) %s)", 4, key_word, classkey, perms+1, expr); in class_constraint_rules_to_strs() 438 char *perms = NULL; in class_or_common_perms_to_str() local 452 perms = strs_to_str(strs); in class_or_common_perms_to_str() 458 return perms; in class_or_common_perms_to_str() 466 char *name, *perms; in write_class_decl_rules_to_cil() local 475 perms = class_or_common_perms_to_str(&class->permissions); in write_class_decl_rules_to_cil() 476 if (perms) { in write_class_decl_rules_to_cil() 477 sepol_printf(out, "(class %s (%s))\n", name, perms); in write_class_decl_rules_to_cil() 1709 char *src, *class, *perms, *new; avtab_node_to_str() local [all...] |
H A D | kernel_to_conf.c | 279 char *perms, *expr; in class_constraint_rules_to_strs() local 293 perms = sepol_av_to_string(pdb, class->s.value, curr->permissions); in class_constraint_rules_to_strs() 294 if (strchr(perms, ' ')) { in class_constraint_rules_to_strs() 311 perm_prefix, perms+1, perm_suffix, in class_constraint_rules_to_strs() 524 char *perms = NULL; in class_or_common_perms_to_str() local 538 perms = strs_to_str(strs); in class_or_common_perms_to_str() 544 return perms; in class_or_common_perms_to_str() 552 char *name, *perms; in write_class_and_common_rules_to_conf() local 576 perms = class_or_common_perms_to_str(&common->permissions); in write_class_and_common_rules_to_conf() 577 if (!perms) { in write_class_and_common_rules_to_conf() 1686 const char *flavor, *src, *tgt, *class, *perms, *new; avtab_node_to_str() local [all...] |
H A D | module_to_cil.c | 568 char *perms; in avrule_to_cil() local 603 perms = sepol_av_to_string(pdb, classperm->tclass, classperm->data); in avrule_to_cil() 604 if (perms == NULL) { in avrule_to_cil() 612 perms + 1); in avrule_to_cil() 642 for (bit = 0; bit < sizeof(xperms->perms)*8; bit++) { in xperms_to_cil() 643 if (!xperm_test(bit, xperms->perms)) in xperms_to_cil() 646 if (in_range && next_bit_in_range(bit, xperms->perms)) { in xperms_to_cil() 649 } else if (next_bit_in_range(bit, xperms->perms)) { in xperms_to_cil() 1213 rc = avrulex_to_cil(indent, pdb, avrule->specified, snames[s], tnames[t], avrule->perms, avrule->xperms); in avrule_list_to_cil() 1215 rc = avrule_to_cil(indent, pdb, avrule->specified, snames[s], tnames[t], avrule->perms); in avrule_list_to_cil() 1652 struct class_perm_datum *perms; global() member 1946 char *perms; constraints_to_cil() local [all...] |
H A D | optimize.c | 182 return process_xperms(x1->perms, x2->perms); in process_avtab_datum() 185 return xperm_test(x1->driver, x2->perms); in process_avtab_datum() 191 return process_xperms(x1->perms, x2->perms); in process_avtab_datum()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/Support/ |
H A D | FileSystem.h | 75 enum perms { enum 99 // Helper functions so that you can use & and | to manipulate perms bits: 100 inline perms operator|(perms l, perms r) { in operator |() 101 return static_cast<perms>(static_cast<unsigned short>(l) | in operator |() 104 inline perms operator&(perms l, perms r) { in operator &() 105 return static_cast<perms>(static_cas in operator &() [all...] |
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/ |
H A D | FileSystem.h | 86 enum perms { enum 111 // Helper functions so that you can use & and | to manipulate perms bits: 112 inline perms operator|(perms l, perms r) { in operator |() 113 return static_cast<perms>(static_cast<unsigned short>(l) | in operator |() 116 inline perms operator&(perms l, perms r) { in operator &() 117 return static_cast<perms>(static_cas in operator &() [all...] |
H A D | VirtualFileSystem.h | 53 llvm::sys::fs::perms Perms; 64 llvm::sys::fs::perms Perms); 77 llvm::sys::fs::perms getPermissions() const { return Perms; } in getPermissions() 426 Optional<llvm::sys::fs::perms> Perms, 443 Optional<llvm::sys::fs::perms> Perms = None); 469 Optional<llvm::sys::fs::perms> Perms = None);
|
/third_party/ntfs-3g/libntfs-3g/ |
H A D | acls.c | 969 int perms; in ntfs_valid_posix() local 1009 perms = pacl->ace[i].perms; in ntfs_valid_posix() 1013 if (perms & ~7) ok = FALSE; in ntfs_valid_posix() 1026 pchk->mode |= perms << 6; in ntfs_valid_posix() 1033 pchk->mode = (pchk->mode & 07707) | (perms << 3); in ntfs_valid_posix() 1040 pchk->mode |= perms; in ntfs_valid_posix() 1050 pchk->mode = (pchk->mode & 07707) | (perms << 3); in ntfs_valid_posix() 1098 mode |= (pace->perms & 7) << 6; in posix_header() 1102 mode = (mode & 07707) | ((pace->perms in posix_header() 1614 u16 perms; build_user_denials() local 1775 u16 perms; build_user_grants() local 1858 u16 perms; build_group_denials_grant() local 2113 u16 perms; buildacls_posix() local 3049 mode_t perms; norm_std_permissions_posix() local 3372 mode_t perms; norm_ownadmin_permissions_posix() local [all...] |
/third_party/ltp/testcases/cve/ |
H A D | cve-2016-10044.c | 33 char perms[8], line[BUFSIZ]; in run() local 47 if (sscanf(line, "%*x-%*x %s", perms) != 1) in run() 49 if (strchr(perms, (int)'x')) in run() 50 tst_res(TFAIL, "AIO mapping is executable: %s!", perms); in run() 52 tst_res(TPASS, "AIO mapping is not executable: %s", perms); in run()
|
/third_party/selinux/libsepol/cil/src/ |
H A D | cil_find.c | 154 cil_list_for_each(i1, cp1->perms) { in cil_classperms_match_any() 156 cil_list_for_each(i2, cp2->perms) { in cil_classperms_match_any() 177 cil_list_for_each(i, cp->perms) { in __cil_classperms_list_match_any() 206 cil_list_for_each(i, cp->perms) { in cil_classperms_list_match_any() 233 cil_list_for_each(i, cp->perms) { in __add_classes_from_classperms_list() 265 cil_symtab_map(&class->perms, __add_classes_from_map_perms, class_list); in cil_expand_class() 279 if (!ebitmap_match_any(px1->perms, px2->perms)) goto exit; in cil_permissionx_match_any() 336 if (cil_classperms_list_match_any(avrule->perms.classperms, target->perms in cil_find_matching_avrule() [all...] |
H A D | cil_post.c | 1022 permx->perms = cil_malloc(sizeof(*permx->perms)); in __evaluate_permissionx_expression() 1023 ebitmap_init(permx->perms); in __evaluate_permissionx_expression() 1025 rc = __cil_expr_to_bitmap(permx->expr_str, permx->perms, 0x10000, db); // max is one more than 0xFFFF in __evaluate_permissionx_expression() 1028 ebitmap_destroy(permx->perms); in __evaluate_permissionx_expression() 1029 free(permx->perms); in __evaluate_permissionx_expression() 1030 permx->perms = NULL; in __evaluate_permissionx_expression() 1570 if (rule->perms.x.permx_str == NULL) { in __cil_post_db_attr_helper() 1571 rc = __evaluate_permissionx_expression(rule->perms.x.permx, db); in __cil_post_db_attr_helper() 2029 ebitmap_t *perms; member 2036 ebitmap_t *perms = perm_args->perms; __perm_bits_to_list() local 2050 __evaluate_perm_expression(struct cil_list *perms, enum cil_flavor flavor, symtab_t *class_symtab, symtab_t *common_symtab, unsigned int num_perms, struct cil_list **new_list, struct cil_db *db) __evaluate_perm_expression() argument [all...] |
H A D | cil_binary.c | 1318 static int __cil_perms_to_datum(struct cil_list *perms, class_datum_t *sepol_class, uint32_t *datum) in __cil_perms_to_datum() argument 1326 cil_list_for_each(curr_perm, perms) { in __cil_perms_to_datum() 1402 rc = __cil_perms_to_datum(cp->perms, sepol_class, &data); in __cil_avrule_expand_helper() 1447 cil_list_for_each(i, cp->perms) { in __cil_avrule_expand() 1493 struct cil_list *classperms = cil_avrule->perms.classperms; in __cil_avrule_to_avtab() 1621 xperms->perms[i] |= ~0U; in __avrule_xperm_setrangebits() 1624 xperms->perms[i] |= XPERM_SETBITS(h); in __avrule_xperm_setrangebits() 1627 xperms->perms[i] |= ~0U - XPERM_SETBITS(low); in __avrule_xperm_setrangebits() 1630 xperms->perms[i] |= XPERM_SETBITS(h) - XPERM_SETBITS(low); in __avrule_xperm_setrangebits() 1833 rc = __cil_avrulex_ioctl_to_hashtable(args->avrulex_ioctl_table, kind, sepol_src->s.value, sepol_tgt->s.value, sepol_obj->s.value, permx->perms); in __cil_avrulex_to_hashtable_helper() 2890 cil_constrain_to_policydb_helper(policydb_t *pdb, const struct cil_db *db, struct cil_symtab_datum *class, struct cil_list *perms, struct cil_list *expr) cil_constrain_to_policydb_helper() argument [all...] |
H A D | cil_reset_ast.c | 27 int num_common_perms = class->num_perms - class->perms.nprim; in cil_reset_class() 28 cil_symtab_map(&class->perms, __class_reset_perm_values, &num_common_perms); in cil_reset_class() 31 class->num_perms = class->perms.nprim; in cil_reset_class() 49 cil_list_destroy(&cp->perms, CIL_FALSE); in cil_reset_classperms() 218 cil_reset_classperms_list(rule->perms.classperms); in cil_reset_avrule()
|
/third_party/skia/infra/bots/ |
H A D | zip_utils.py | 44 perms = os.stat(filepath).st_mode 51 zi.external_attr = perms << 16 77 perms = zi.external_attr >> 16 78 os.chmod(dst_path, perms)
|
/third_party/ntfs-3g/ntfsprogs/ |
H A D | ntfssecaudit.c | 32 * ntfssecaudit volume perms file 33 * set the security parameters of file to perms (mode or acl) 34 * ntfssecaudit -r[v] volume perms directory 35 * set the security parameters of files in directory to perms 57 * ntfssecaudit perms file 58 * set the security parameters of file to perms (mode or acl) 59 * ntfssecaudit -r[v] perms directory 60 * set the security parameters of files in directory to perms 1517 int perms; in showposix() local 1543 perms in showposix() 2750 mode_t perms; check_samples() local 5586 u16 perms; encode_posix_acl() local 5877 setperms(const char *volume, const char *perms, const char *base) setperms() argument [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
H A D | lgetxattr.c | 36 mode_t perms = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; in lgetxattr_0100() local 37 int fd = open(path, O_RDWR | O_CREAT, perms); in lgetxattr_0100()
|
H A D | llistxattr.c | 36 mode_t perms = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; in llistxattr_0100() local 37 int fd = open(path, O_RDWR | O_CREAT, perms); in llistxattr_0100()
|
H A D | listxattr.c | 36 mode_t perms = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; in listxattr_0100() local 37 int fd = open(path, O_RDWR | O_CREAT, perms); in listxattr_0100()
|
/third_party/selinux/libselinux/include/selinux/ |
H A D | avc.h | 380 * @perms: permissions 384 * and the permissions @perms, interpreting 385 * @perms based on @tclass. Returns %0 on success or 391 access_vector_t perms, 395 access_vector_t perms);
|