Lines Matching defs:items
328 SELinuxFreeItems(SELinuxListItemRec *items, int count)
332 freecon(items[k].octx);
333 freecon(items[k].dctx);
335 free(items);
339 SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
354 buf[pos] = items[k].id;
359 buf[pos] = items[k].octx_len * 4;
364 buf[pos] = items[k].dctx_len * 4;
369 memcpy((char *)(buf + pos), items[k].octx, strlen(items[k].octx) + 1);
370 pos += items[k].octx_len;
371 memcpy((char *)(buf + pos), items[k].dctx, strlen(items[k].dctx) + 1);
372 pos += items[k].dctx_len;
394 SELinuxFreeItems(items, count);
403 SELinuxListItemRec *items;
414 /* Count the number of properties and allocate items */
418 items = calloc(count, sizeof(SELinuxListItemRec));
419 if (count && !items)
422 /* Fill in the items and calculate size */
427 rc = SELinuxPopulateItem(items + i, &pProp->devPrivates, id, &size);
429 SELinuxFreeItems(items, count);
435 return SELinuxSendItemsToClient(client, items, size, count);
442 SELinuxListItemRec *items;
448 /* Count the number of selections and allocate items */
452 items = calloc(count, sizeof(SELinuxListItemRec));
453 if (count && !items)
456 /* Fill in the items and calculate size */
461 rc = SELinuxPopulateItem(items + i, &pSel->devPrivates, id, &size);
463 SELinuxFreeItems(items, count);
469 return SELinuxSendItemsToClient(client, items, size, count);