Home | History | Annotate | Download | only in src

Lines Matching refs:handle

22 #include "handle.h"
54 static int dbase_policydb_set_serial(semanage_handle_t * handle,
58 int cache_serial = handle->funcs->get_serial(handle);
60 ERR(handle, "could not update cache serial");
68 static int dbase_policydb_needs_resync(semanage_handle_t * handle,
77 cache_serial = handle->funcs->get_serial(handle);
89 static int dbase_policydb_cache(semanage_handle_t * handle,
102 if (!dbase_policydb_needs_resync(handle, dbase))
105 fname = dbase->path[handle->is_in_transaction];
108 ERR(handle, "could not create policydb object");
116 ERR(handle, "could not open %s for reading: %s",
125 ERR(handle, "could not create policy file object");
130 sepol_policy_file_set_handle(pf, handle->sepolh);
141 if (dbase_policydb_set_serial(handle, dbase) < 0)
149 ERR(handle, "could not cache policy database");
157 static int dbase_policydb_flush(semanage_handle_t * handle
178 int dbase_policydb_init(semanage_handle_t * handle,
205 ERR(handle, "out of memory, could not initialize policy database");
241 static int dbase_policydb_add(semanage_handle_t * handle,
246 if (dbase->rptable->add(handle->sepolh, dbase->policydb, key, data) < 0)
253 ERR(handle, "could not add record to the database");
257 static int dbase_policydb_set(semanage_handle_t * handle,
262 if (dbase->rptable->set(handle->sepolh, dbase->policydb, key, data) < 0)
269 ERR(handle, "could not set record value");
273 static int dbase_policydb_modify(semanage_handle_t * handle,
279 if (dbase->rptable->modify(handle->sepolh,
287 ERR(handle, "could not modify record value");
291 static int dbase_policydb_del(semanage_handle_t * handle
303 static int dbase_policydb_clear(semanage_handle_t * handle
313 static int dbase_policydb_query(semanage_handle_t * handle,
318 if (dbase->rptable->query(handle->sepolh,
325 ERR(handle, "could not query record value");
329 static int dbase_policydb_exists(semanage_handle_t * handle,
334 if (dbase->rptable->exists(handle->sepolh,
341 ERR(handle, "could not check if record exists");
345 static int dbase_policydb_count(semanage_handle_t * handle,
350 if (dbase->rptable->count(handle->sepolh,
357 ERR(handle, "could not count the database records");
361 static int dbase_policydb_iterate(semanage_handle_t * handle,
367 if (dbase->rptable->iterate(handle->sepolh,
374 ERR(handle, "could not iterate over records");
379 semanage_handle_t *handle;
390 if (arg->rtable->clone(arg->handle, record, &arg->records[arg->pos]) <
397 static int dbase_policydb_list(semanage_handle_t * handle,
407 list_arg.handle = handle;
409 if (dbase->rptable->count(handle->sepolh,
422 if (dbase->rptable->iterate(handle->sepolh,
425 ERR(handle, "list handler could not extract record");
435 ERR(handle, "out of memory");
443 ERR(handle, "could not list records");