Lines Matching refs:new_ocon
3086 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_ISID], &tail); in cil_sidorder_to_policydb() local
3088 new_ocon->sid[0] = count; in cil_sidorder_to_policydb()
3089 new_ocon->u.name = cil_strdup(cil_sid->datum.fqn); in cil_sidorder_to_policydb()
3090 rc = __cil_context_to_sepol_context(pdb, cil_context, &new_ocon->context[0]); in cil_sidorder_to_policydb()
3211 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_PORT], &tail); in cil_portcon_to_policydb() local
3215 new_ocon->u.port.protocol = IPPROTO_UDP; in cil_portcon_to_policydb()
3218 new_ocon->u.port.protocol = IPPROTO_TCP; in cil_portcon_to_policydb()
3221 new_ocon->u.port.protocol = IPPROTO_DCCP; in cil_portcon_to_policydb()
3229 new_ocon->u.port.low_port = cil_portcon->port_low; in cil_portcon_to_policydb()
3230 new_ocon->u.port.high_port = cil_portcon->port_high; in cil_portcon_to_policydb()
3232 rc = __cil_context_to_sepol_context(pdb, cil_portcon->context, &new_ocon->context[0]); in cil_portcon_to_policydb()
3251 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_NETIF], &tail); in cil_netifcon_to_policydb() local
3254 new_ocon->u.name = cil_strdup(cil_netifcon->interface_str); in cil_netifcon_to_policydb()
3256 rc = __cil_context_to_sepol_context(pdb, cil_netifcon->if_context, &new_ocon->context[0]); in cil_netifcon_to_policydb()
3261 rc = __cil_context_to_sepol_context(pdb, cil_netifcon->packet_context, &new_ocon->context[1]); in cil_netifcon_to_policydb()
3263 context_destroy(&new_ocon->context[0]); in cil_netifcon_to_policydb()
3282 ocontext_t *new_ocon = NULL; in cil_nodecon_to_policydb() local
3286 new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_NODE], &tail); in cil_nodecon_to_policydb()
3287 new_ocon->u.node.addr = cil_nodecon->addr->ip.v4.s_addr; in cil_nodecon_to_policydb()
3288 new_ocon->u.node.mask = cil_nodecon->mask->ip.v4.s_addr; in cil_nodecon_to_policydb()
3290 new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_NODE6], &tail6); in cil_nodecon_to_policydb()
3291 memcpy(new_ocon->u.node6.addr, &cil_nodecon->addr->ip.v6.s6_addr[0], 16); in cil_nodecon_to_policydb()
3292 memcpy(new_ocon->u.node6.mask, &cil_nodecon->mask->ip.v6.s6_addr[0], 16); in cil_nodecon_to_policydb()
3299 rc = __cil_context_to_sepol_context(pdb, cil_nodecon->context, &new_ocon->context[0]); in cil_nodecon_to_policydb()
3318 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_FSUSE], &tail); in cil_fsuse_to_policydb() local
3321 new_ocon->u.name = cil_strdup(cil_fsuse->fs_str); in cil_fsuse_to_policydb()
3322 new_ocon->v.behavior = cil_fsuse->type; in cil_fsuse_to_policydb()
3324 rc = __cil_context_to_sepol_context(pdb, cil_fsuse->context, &new_ocon->context[0]); in cil_fsuse_to_policydb()
3345 ocontext_t *new_ocon = cil_malloc(sizeof(ocontext_t)); in cil_genfscon_to_policydb() local
3346 memset(new_ocon, 0, sizeof(ocontext_t)); in cil_genfscon_to_policydb()
3349 ocon_tail->next = new_ocon; in cil_genfscon_to_policydb()
3354 new_genfs->head = new_ocon; in cil_genfscon_to_policydb()
3364 ocon_tail = new_ocon; in cil_genfscon_to_policydb()
3366 new_ocon->u.name = cil_strdup(cil_genfscon->path_str); in cil_genfscon_to_policydb()
3368 rc = __cil_context_to_sepol_context(pdb, cil_genfscon->context, &new_ocon->context[0]); in cil_genfscon_to_policydb()
3387 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_PIRQ], &tail); in cil_pirqcon_to_policydb() local
3390 new_ocon->u.pirq = cil_pirqcon->pirq; in cil_pirqcon_to_policydb()
3392 rc = __cil_context_to_sepol_context(pdb, cil_pirqcon->context, &new_ocon->context[0]); in cil_pirqcon_to_policydb()
3411 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_IOMEM], &tail); in cil_iomemcon_to_policydb() local
3414 new_ocon->u.iomem.low_iomem = cil_iomemcon->iomem_low; in cil_iomemcon_to_policydb()
3415 new_ocon->u.iomem.high_iomem = cil_iomemcon->iomem_high; in cil_iomemcon_to_policydb()
3417 rc = __cil_context_to_sepol_context(pdb, cil_iomemcon->context, &new_ocon->context[0]); in cil_iomemcon_to_policydb()
3436 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_IOPORT], &tail); in cil_ioportcon_to_policydb() local
3439 new_ocon->u.ioport.low_ioport = cil_ioportcon->ioport_low; in cil_ioportcon_to_policydb()
3440 new_ocon->u.ioport.high_ioport = cil_ioportcon->ioport_high; in cil_ioportcon_to_policydb()
3442 rc = __cil_context_to_sepol_context(pdb, cil_ioportcon->context, &new_ocon->context[0]); in cil_ioportcon_to_policydb()
3461 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_PCIDEVICE], &tail); in cil_pcidevicecon_to_policydb() local
3464 new_ocon->u.device = cil_pcidevicecon->dev; in cil_pcidevicecon_to_policydb()
3466 rc = __cil_context_to_sepol_context(pdb, cil_pcidevicecon->context, &new_ocon->context[0]); in cil_pcidevicecon_to_policydb()
3485 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_DEVICETREE], &tail); in cil_devicetreecon_to_policydb() local
3488 new_ocon->u.name = cil_strdup(cil_devicetreecon->path); in cil_devicetreecon_to_policydb()
3490 rc = __cil_context_to_sepol_context(pdb, cil_devicetreecon->context, &new_ocon->context[0]); in cil_devicetreecon_to_policydb()