Home | History | Annotate | Download | only in src

Lines Matching full: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
168 handle = NULL;
179 int dbase_policydb_init(semanage_handle_t * handle,
206 ERR(handle, "out of memory, could not initialize policy database");
242 static int dbase_policydb_add(semanage_handle_t * handle,
247 if (dbase->rptable->add(handle->sepolh, dbase->policydb, key, data) < 0)
254 ERR(handle, "could not add record to the database");
258 static int dbase_policydb_set(semanage_handle_t * handle,
263 if (dbase->rptable->set(handle->sepolh, dbase->policydb, key, data) < 0)
270 ERR(handle, "could not set record value");
274 static int dbase_policydb_modify(semanage_handle_t * handle,
280 if (dbase->rptable->modify(handle->sepolh,
288 ERR(handle, "could not modify record value");
292 static int dbase_policydb_del(semanage_handle_t * handle
302 handle = NULL;
307 static int dbase_policydb_clear(semanage_handle_t * handle
314 handle = NULL;
319 static int dbase_policydb_query(semanage_handle_t * handle,
324 if (dbase->rptable->query(handle->sepolh,
331 ERR(handle, "could not query record value");
335 static int dbase_policydb_exists(semanage_handle_t * handle,
340 if (dbase->rptable->exists(handle->sepolh,
347 ERR(handle, "could not check if record exists");
351 static int dbase_policydb_count(semanage_handle_t * handle,
356 if (dbase->rptable->count(handle->sepolh,
363 ERR(handle, "could not count the database records");
367 static int dbase_policydb_iterate(semanage_handle_t * handle,
373 if (dbase->rptable->iterate(handle->sepolh,
380 ERR(handle, "could not iterate over records");
385 semanage_handle_t *handle;
396 if (arg->rtable->clone(arg->handle, record, &arg->records[arg->pos]) <
403 static int dbase_policydb_list(semanage_handle_t * handle,
413 list_arg.handle = handle;
415 if (dbase->rptable->count(handle->sepolh,
428 if (dbase->rptable->iterate(handle->sepolh,
431 ERR(handle, "list handler could not extract record");
441 ERR(handle, "out of memory");
449 ERR(handle, "could not list records");