Home
last modified time | relevance | path

Searched refs:ibendport (Results 1 – 21 of 21) sorted by relevance

/external/selinux/libsepol/src/
Dibendport_record.c93 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 …]
Dibendports.c16 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 …]
Dkernel_to_common.c547 rc = strcmp((*aa)->u.ibendport.dev_name, (*bb)->u.ibendport.dev_name); in ibendport_data_cmp()
551 return (*aa)->u.ibendport.port - (*bb)->u.ibendport.port; in ibendport_data_cmp()
Dmodule_to_cil.c2799 struct ocontext *ibendport; in ocontext_selinux_ibendport_to_cil() local
2801 for (ibendport = ibendports; ibendport; ibendport = ibendport->next) { in ocontext_selinux_ibendport_to_cil()
2802 cil_printf("(ibendportcon %s %u ", ibendport->u.ibendport.dev_name, ibendport->u.ibendport.port); in ocontext_selinux_ibendport_to_cil()
2803 context_to_cil(pdb, &ibendport->context[0]); in ocontext_selinux_ibendport_to_cil()
Dexpand.c2234 n->u.ibendport.dev_name = strdup(c->u.ibendport.dev_name); in ocontext_copy_selinux()
2235 if (!n->u.ibendport.dev_name) { in ocontext_copy_selinux()
2239 n->u.ibendport.port = c->u.ibendport.port; in ocontext_copy_selinux()
Dpolicydb.c1425 free(ctmp->u.ibendport.dev_name); in ocontext_selinux_free()
2871 c->u.ibendport.dev_name = malloc(len + 1); in ocontext_read_selinux()
2872 if (!c->u.ibendport.dev_name) in ocontext_read_selinux()
2874 rc = next_entry(c->u.ibendport.dev_name, fp, len); in ocontext_read_selinux()
2877 c->u.ibendport.dev_name[len] = 0; in ocontext_read_selinux()
2878 c->u.ibendport.port = port; in ocontext_read_selinux()
Dwrite.c1431 len = strlen(c->u.ibendport.dev_name); in ocontext_write_selinux()
1433 buf[1] = cpu_to_le32(c->u.ibendport.port); in ocontext_write_selinux()
1437 items = put_entry(c->u.ibendport.dev_name, 1, len, fp); in ocontext_write_selinux()
Dservices.c1963 if (c->u.ibendport.port == port && in sepol_ibendport_sid()
1964 !strcmp(dev_name, c->u.ibendport.dev_name)) in sepol_ibendport_sid()
Dkernel_to_conf.c2741 rc = snprintf(port_str, 4, "%u", ibendportcon->u.ibendport.port); in write_selinux_ibendport_rules_to_conf()
2753 sepol_printf(out, "ibendportcon %s %s %s\n", ibendportcon->u.ibendport.dev_name, port_str, ctx); in write_selinux_ibendport_rules_to_conf()
Dkernel_to_cil.c2879 rc = snprintf(port_str, 4, "%u", ibendportcon->u.ibendport.port); in write_selinux_ibendport_rules_to_cil()
2892 ibendportcon->u.ibendport.dev_name, port_str, ctx); in write_selinux_ibendport_rules_to_cil()
/external/selinux/libsemanage/src/
Dibendport_record.c26 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 …]
Dibendports_file.c24 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()
Dibendport_internal.h45 hidden int semanage_ibendport_compare2_qsort(const semanage_ibendport_t **ibendport,
/external/selinux/libsemanage/include/semanage/
Dibendport_record.h18 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/
Dibendport_record.h17 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 …]
Dibendports.h42 int (*fn)(const sepol_ibendport_t *ibendport,
/external/selinux/python/semanage/
Dseobject.py1598 def __genkey(self, ibendport, ibdev_name): argument
1602 port = int(ibendport)
1609 … raise ValueError(_("Could not create a key for ibendport %s/%s") % (ibdev_name, ibendport))
1612 def __add(self, ibendport, ibdev_name, serange, type): argument
1626 (k, ibendport, port) = self.__genkey(ibendport, ibdev_name)
1673 def add(self, ibendport, ibdev_name, serange, type): argument
1675 self.__add(ibendport, ibdev_name, serange, type)
1678 def __modify(self, ibendport, ibdev_name, serange, setype): argument
1690 (k, ibdev_name, port) = self.__genkey(ibendport, ibdev_name)
1694 … raise ValueError(_("Could not check if ibendport %s/%s is defined") % (ibdev_name, ibendport))
[all …]
Dsemanage532 OBJECT.add(args.ibendport, args.ibdev_name, args.range, args.type)
534 OBJECT.modify(args.ibendport, args.ibdev_name, args.range, args.type)
536 OBJECT.delete(args.ibendport, args.ibdev_name)
/external/selinux/checkpolicy/
Dpolicy_define.c5209 newc->u.ibendport.dev_name = queue_remove(id_queue); in define_ibendport_context()
5210 if (!newc->u.ibendport.dev_name) { in define_ibendport_context()
5216 if (strlen(newc->u.ibendport.dev_name) > IB_DEVICE_NAME_MAX - 1) { in define_ibendport_context()
5222 newc->u.ibendport.port = port; in define_ibendport_context()
5234 port2 = c->u.ibendport.port; in define_ibendport_context()
5237 !strcmp(c->u.ibendport.dev_name, in define_ibendport_context()
5238 newc->u.ibendport.dev_name)) { in define_ibendport_context()
5240 newc->u.ibendport.dev_name, port); in define_ibendport_context()
5254 free(newc->u.ibendport.dev_name); in define_ibendport_context()
/external/selinux/libsepol/include/sepol/policydb/
Dpolicydb.h372 } ibendport; member
/external/selinux/libsepol/cil/src/
Dcil_binary.c3353 new_ocon->u.ibendport.dev_name = cil_strdup(cil_ibendportcon->dev_name_str); in cil_ibendportcon_to_policydb()
3354 new_ocon->u.ibendport.port = cil_ibendportcon->port; in cil_ibendportcon_to_policydb()