Lines Matching refs:new_ocon
2914 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_ISID], &tail); in cil_sidorder_to_policydb() local
2916 new_ocon->sid[0] = count; in cil_sidorder_to_policydb()
2917 new_ocon->u.name = cil_strdup(cil_sid->datum.fqn); in cil_sidorder_to_policydb()
2918 rc = __cil_context_to_sepol_context(pdb, cil_context, &new_ocon->context[0]); in cil_sidorder_to_policydb()
3029 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_PORT], &tail); in cil_portcon_to_policydb() local
3033 new_ocon->u.port.protocol = IPPROTO_UDP; in cil_portcon_to_policydb()
3036 new_ocon->u.port.protocol = IPPROTO_TCP; in cil_portcon_to_policydb()
3044 new_ocon->u.port.low_port = cil_portcon->port_low; in cil_portcon_to_policydb()
3045 new_ocon->u.port.high_port = cil_portcon->port_high; in cil_portcon_to_policydb()
3047 rc = __cil_context_to_sepol_context(pdb, cil_portcon->context, &new_ocon->context[0]); in cil_portcon_to_policydb()
3066 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_NETIF], &tail); in cil_netifcon_to_policydb() local
3069 new_ocon->u.name = cil_strdup(cil_netifcon->interface_str); in cil_netifcon_to_policydb()
3071 rc = __cil_context_to_sepol_context(pdb, cil_netifcon->if_context, &new_ocon->context[0]); in cil_netifcon_to_policydb()
3076 rc = __cil_context_to_sepol_context(pdb, cil_netifcon->packet_context, &new_ocon->context[1]); in cil_netifcon_to_policydb()
3078 context_destroy(&new_ocon->context[0]); in cil_netifcon_to_policydb()
3097 ocontext_t *new_ocon = NULL; in cil_nodecon_to_policydb() local
3101 new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_NODE], &tail); in cil_nodecon_to_policydb()
3102 new_ocon->u.node.addr = cil_nodecon->addr->ip.v4.s_addr; in cil_nodecon_to_policydb()
3103 new_ocon->u.node.mask = cil_nodecon->mask->ip.v4.s_addr; in cil_nodecon_to_policydb()
3105 new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_NODE6], &tail6); in cil_nodecon_to_policydb()
3106 memcpy(new_ocon->u.node6.addr, &cil_nodecon->addr->ip.v6.s6_addr[0], 16); in cil_nodecon_to_policydb()
3107 memcpy(new_ocon->u.node6.mask, &cil_nodecon->mask->ip.v6.s6_addr[0], 16); in cil_nodecon_to_policydb()
3114 rc = __cil_context_to_sepol_context(pdb, cil_nodecon->context, &new_ocon->context[0]); in cil_nodecon_to_policydb()
3133 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_FSUSE], &tail); in cil_fsuse_to_policydb() local
3136 new_ocon->u.name = cil_strdup(cil_fsuse->fs_str); in cil_fsuse_to_policydb()
3137 new_ocon->v.behavior = cil_fsuse->type; in cil_fsuse_to_policydb()
3139 rc = __cil_context_to_sepol_context(pdb, cil_fsuse->context, &new_ocon->context[0]); in cil_fsuse_to_policydb()
3160 ocontext_t *new_ocon = cil_malloc(sizeof(ocontext_t)); in cil_genfscon_to_policydb() local
3161 memset(new_ocon, 0, sizeof(ocontext_t)); in cil_genfscon_to_policydb()
3164 ocon_tail->next = new_ocon; in cil_genfscon_to_policydb()
3169 new_genfs->head = new_ocon; in cil_genfscon_to_policydb()
3179 ocon_tail = new_ocon; in cil_genfscon_to_policydb()
3181 new_ocon->u.name = cil_strdup(cil_genfscon->path_str); in cil_genfscon_to_policydb()
3183 rc = __cil_context_to_sepol_context(pdb, cil_genfscon->context, &new_ocon->context[0]); in cil_genfscon_to_policydb()
3202 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_PIRQ], &tail); in cil_pirqcon_to_policydb() local
3205 new_ocon->u.pirq = cil_pirqcon->pirq; in cil_pirqcon_to_policydb()
3207 rc = __cil_context_to_sepol_context(pdb, cil_pirqcon->context, &new_ocon->context[0]); in cil_pirqcon_to_policydb()
3226 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_IOMEM], &tail); in cil_iomemcon_to_policydb() local
3229 new_ocon->u.iomem.low_iomem = cil_iomemcon->iomem_low; in cil_iomemcon_to_policydb()
3230 new_ocon->u.iomem.high_iomem = cil_iomemcon->iomem_high; in cil_iomemcon_to_policydb()
3232 rc = __cil_context_to_sepol_context(pdb, cil_iomemcon->context, &new_ocon->context[0]); in cil_iomemcon_to_policydb()
3251 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_IOPORT], &tail); in cil_ioportcon_to_policydb() local
3254 new_ocon->u.ioport.low_ioport = cil_ioportcon->ioport_low; in cil_ioportcon_to_policydb()
3255 new_ocon->u.ioport.high_ioport = cil_ioportcon->ioport_high; in cil_ioportcon_to_policydb()
3257 rc = __cil_context_to_sepol_context(pdb, cil_ioportcon->context, &new_ocon->context[0]); in cil_ioportcon_to_policydb()
3276 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_PCIDEVICE], &tail); in cil_pcidevicecon_to_policydb() local
3279 new_ocon->u.device = cil_pcidevicecon->dev; in cil_pcidevicecon_to_policydb()
3281 rc = __cil_context_to_sepol_context(pdb, cil_pcidevicecon->context, &new_ocon->context[0]); in cil_pcidevicecon_to_policydb()
3300 ocontext_t *new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_XEN_DEVICETREE], &tail); in cil_devicetreecon_to_policydb() local
3303 new_ocon->u.name = cil_strdup(cil_devicetreecon->path); in cil_devicetreecon_to_policydb()
3305 rc = __cil_context_to_sepol_context(pdb, cil_devicetreecon->context, &new_ocon->context[0]); in cil_devicetreecon_to_policydb()