/external/selinux/libsepol/src/ |
D | ibendport_record.c | 93 const sepol_ibendport_t *ibendport, in hidden_def() 97 (handle, ibendport->ibdev_name, ibendport->port, key_ptr) < 0) { in hidden_def() 99 ibendport->ibdev_name, in hidden_def() 100 ibendport->port); in hidden_def() 116 int sepol_ibendport_compare(const sepol_ibendport_t *ibendport, const sepol_ibendport_key_t *key) in sepol_ibendport_compare() argument 120 rc = strcmp(ibendport->ibdev_name, key->ibdev_name); in sepol_ibendport_compare() 122 if ((ibendport->port == key->port) && !rc) in sepol_ibendport_compare() 125 if (ibendport->port < key->port) in sepol_ibendport_compare() 127 else if (key->port < ibendport->port) in sepol_ibendport_compare() 133 int sepol_ibendport_compare2(const sepol_ibendport_t *ibendport, const sepol_ibendport_t *ibendport… in sepol_ibendport_compare2() argument [all …]
|
D | ibendports.c | 16 ocontext_t **ibendport, in ibendport_from_record() argument 29 &tmp_ibendport->u.ibendport.dev_name) < 0) in ibendport_from_record() 37 strncpy(tmp_ibendport->u.ibendport.dev_name, ibdev_name, IB_DEVICE_NAME_MAX); in ibendport_from_record() 42 tmp_ibendport->u.ibendport.port = port; in ibendport_from_record() 53 *ibendport = tmp_ibendport; in ibendport_from_record() 73 ocontext_t *ibendport, in ibendport_to_record() argument 76 int port = ibendport->u.ibendport.port; in ibendport_to_record() 77 context_struct_t *con = &ibendport->context[0]; in ibendport_to_record() 86 ibendport->u.ibendport.dev_name) < 0) in ibendport_to_record() 139 const char *ibdev_name2 = c->u.ibendport.dev_name; in sepol_ibendport_exists() [all …]
|
D | kernel_to_common.c | 545 rc = strcmp((*aa)->u.ibendport.dev_name, (*bb)->u.ibendport.dev_name); in ibendport_data_cmp() 549 return (*aa)->u.ibendport.port - (*bb)->u.ibendport.port; in ibendport_data_cmp()
|
D | module_to_cil.c | 2763 struct ocontext *ibendport; in ocontext_selinux_ibendport_to_cil() local 2765 for (ibendport = ibendports; ibendport; ibendport = ibendport->next) { in ocontext_selinux_ibendport_to_cil() 2766 cil_printf("(ibendportcon %s %u ", ibendport->u.ibendport.dev_name, ibendport->u.ibendport.port); in ocontext_selinux_ibendport_to_cil() 2767 context_to_cil(pdb, &ibendport->context[0]); in ocontext_selinux_ibendport_to_cil()
|
D | expand.c | 2203 n->u.ibendport.dev_name = strdup(c->u.ibendport.dev_name); in ocontext_copy_selinux() 2204 if (!n->u.ibendport.dev_name) { in ocontext_copy_selinux() 2208 n->u.ibendport.port = c->u.ibendport.port; in ocontext_copy_selinux()
|
D | policydb.c | 1447 free(ctmp->u.ibendport.dev_name); in ocontext_selinux_free() 2889 c->u.ibendport.dev_name = malloc(len + 1); in ocontext_read_selinux() 2890 if (!c->u.ibendport.dev_name) in ocontext_read_selinux() 2892 rc = next_entry(c->u.ibendport.dev_name, fp, len); in ocontext_read_selinux() 2895 c->u.ibendport.dev_name[len] = 0; in ocontext_read_selinux() 2896 c->u.ibendport.port = port; in ocontext_read_selinux()
|
D | write.c | 1461 len = strlen(c->u.ibendport.dev_name); in ocontext_write_selinux() 1463 buf[1] = cpu_to_le32(c->u.ibendport.port); in ocontext_write_selinux() 1467 items = put_entry(c->u.ibendport.dev_name, 1, len, fp); in ocontext_write_selinux()
|
D | services.c | 1959 if (c->u.ibendport.port == port && in sepol_ibendport_sid() 1960 !strcmp(dev_name, c->u.ibendport.dev_name)) in sepol_ibendport_sid()
|
D | kernel_to_conf.c | 2751 rc = snprintf(port_str, 4, "%u", ibendportcon->u.ibendport.port); in write_selinux_ibendport_rules_to_conf() 2763 sepol_printf(out, "ibendportcon %s %s %s\n", ibendportcon->u.ibendport.dev_name, port_str, ctx); in write_selinux_ibendport_rules_to_conf()
|
D | kernel_to_cil.c | 2877 rc = snprintf(port_str, 4, "%u", ibendportcon->u.ibendport.port); in write_selinux_ibendport_rules_to_cil() 2890 ibendportcon->u.ibendport.dev_name, port_str, ctx); in write_selinux_ibendport_rules_to_cil()
|
/external/selinux/libsemanage/src/ |
D | ibendport_record.c | 26 int semanage_ibendport_compare(const semanage_ibendport_t *ibendport, in semanage_ibendport_compare() argument 29 return sepol_ibendport_compare(ibendport, key); in semanage_ibendport_compare() 34 int semanage_ibendport_compare2(const semanage_ibendport_t *ibendport, in hidden_def() 37 return sepol_ibendport_compare2(ibendport, ibendport2); in hidden_def() 42 hidden int semanage_ibendport_compare2_qsort(const semanage_ibendport_t **ibendport, in hidden_def() 45 return sepol_ibendport_compare2(*ibendport, *ibendport2); in hidden_def() 57 const semanage_ibendport_t *ibendport, in semanage_ibendport_key_extract() argument 60 return sepol_ibendport_key_extract(handle->sepolh, ibendport, key_ptr); in semanage_ibendport_key_extract() 73 const semanage_ibendport_t *ibendport, in hidden_def() 76 return sepol_ibendport_get_ibdev_name(handle->sepolh, ibendport, ibdev_name_ptr); in hidden_def() [all …]
|
D | ibendports_file.c | 24 semanage_ibendport_t *ibendport, in ibendport_print() argument 29 int port = semanage_ibendport_get_port(ibendport); in ibendport_print() 31 if (semanage_ibendport_get_ibdev_name(handle, ibendport, &ibdev_name_str) != 0) in ibendport_print() 34 semanage_context_t *con = semanage_ibendport_get_con(ibendport); in ibendport_print() 61 semanage_ibendport_t *ibendport) in ibendport_parse() argument 81 if (semanage_ibendport_set_ibdev_name(handle, ibendport, str) < 0) in ibendport_parse() 91 semanage_ibendport_set_port(ibendport, port); in ibendport_parse() 111 if (semanage_ibendport_set_con(handle, ibendport, con) < 0) in ibendport_parse()
|
D | ibendport_internal.h | 45 hidden int semanage_ibendport_compare2_qsort(const semanage_ibendport_t **ibendport,
|
/external/selinux/libsemanage/include/semanage/ |
D | ibendport_record.h | 18 extern int semanage_ibendport_compare(const semanage_ibendport_t *ibendport, 21 extern int semanage_ibendport_compare2(const semanage_ibendport_t *ibendport, 30 const semanage_ibendport_t *ibendport, 36 const semanage_ibendport_t *ibendport, 40 semanage_ibendport_t *ibendport, 43 extern int semanage_ibendport_get_port(const semanage_ibendport_t *ibendport); 45 extern void semanage_ibendport_set_port(semanage_ibendport_t *ibendport, int port); 47 extern semanage_context_t *semanage_ibendport_get_con(const semanage_ibendport_t *ibendport); 50 semanage_ibendport_t *ibendport, 57 const semanage_ibendport_t *ibendport, [all …]
|
/external/selinux/libsepol/include/sepol/ |
D | ibendport_record.h | 17 extern int sepol_ibendport_compare(const sepol_ibendport_t *ibendport, 20 extern int sepol_ibendport_compare2(const sepol_ibendport_t *ibendport, 36 const sepol_ibendport_t *ibendport, 41 extern void sepol_ibendport_set_port(sepol_ibendport_t *ibendport, int port); 43 extern int sepol_ibendport_get_port(const sepol_ibendport_t *ibendport); 46 const sepol_ibendport_t *ibendport, 50 sepol_ibendport_t *ibendport, 53 extern sepol_context_t *sepol_ibendport_get_con(const sepol_ibendport_t *ibendport); 56 sepol_ibendport_t *ibendport, 63 const sepol_ibendport_t *ibendport, [all …]
|
D | ibendports.h | 42 int (*fn)(const sepol_ibendport_t *ibendport,
|
/external/selinux/libsemanage/tests/ |
D | test_ibendport.c | 101 semanage_ibendport_t *ibendport; in get_ibendport_nth() local 110 ibendport = records[idx]; in get_ibendport_nth() 116 return ibendport; in get_ibendport_nth() 122 semanage_ibendport_t *ibendport; in get_ibendport_key_nth() local 128 ibendport = get_ibendport_nth(idx); in get_ibendport_key_nth() 130 res = semanage_ibendport_key_extract(sh, ibendport, &key); in get_ibendport_key_nth() 140 semanage_ibendport_t *ibendport; in add_local_ibendport() local 143 ibendport = get_ibendport_nth(idx); in add_local_ibendport() 145 CU_ASSERT_FATAL(semanage_ibendport_key_extract(sh, ibendport, in add_local_ibendport() 150 ibendport) >= 0); in add_local_ibendport() [all …]
|
D | libsemanage-tests.c | 75 DECLARE_SUITE(ibendport); in do_tests()
|
/external/selinux/python/semanage/ |
D | seobject.py | 1607 def __genkey(self, ibendport, ibdev_name): argument 1611 port = int(ibendport) 1618 … raise ValueError(_("Could not create a key for ibendport %s/%s") % (ibdev_name, ibendport)) 1621 def __add(self, ibendport, ibdev_name, serange, type): argument 1635 (k, ibendport, port) = self.__genkey(ibendport, ibdev_name) 1682 def add(self, ibendport, ibdev_name, serange, type): argument 1684 self.__add(ibendport, ibdev_name, serange, type) 1687 def __modify(self, ibendport, ibdev_name, serange, setype): argument 1699 (k, ibdev_name, port) = self.__genkey(ibendport, ibdev_name) 1703 … raise ValueError(_("Could not check if ibendport %s/%s is defined") % (ibdev_name, ibendport)) [all …]
|
D | semanage | 529 OBJECT.add(args.ibendport, args.ibdev_name, args.range, args.type) 531 OBJECT.modify(args.ibendport, args.ibdev_name, args.range, args.type) 533 OBJECT.delete(args.ibendport, args.ibdev_name)
|
/external/selinux/checkpolicy/ |
D | policy_define.c | 5174 newc->u.ibendport.dev_name = queue_remove(id_queue); in define_ibendport_context() 5175 if (!newc->u.ibendport.dev_name) { in define_ibendport_context() 5181 if (strlen(newc->u.ibendport.dev_name) > IB_DEVICE_NAME_MAX - 1) { in define_ibendport_context() 5187 newc->u.ibendport.port = port; in define_ibendport_context() 5199 port2 = c->u.ibendport.port; in define_ibendport_context() 5202 !strcmp(c->u.ibendport.dev_name, in define_ibendport_context() 5203 newc->u.ibendport.dev_name)) { in define_ibendport_context() 5205 newc->u.ibendport.dev_name, port); in define_ibendport_context() 5219 free(newc->u.ibendport.dev_name); in define_ibendport_context()
|
/external/selinux/libsepol/include/sepol/policydb/ |
D | policydb.h | 373 } ibendport; member
|
/external/selinux/libsepol/cil/src/ |
D | cil_binary.c | 3272 new_ocon->u.ibendport.dev_name = cil_strdup(cil_ibendportcon->dev_name_str); in cil_ibendportcon_to_policydb() 3273 new_ocon->u.ibendport.port = cil_ibendportcon->port; in cil_ibendportcon_to_policydb()
|