Home
last modified time | relevance | path

Searched refs:dbase (Results 1 – 25 of 44) sorted by relevance

12

/external/selinux/libsemanage/src/
Ddatabase_llist.c16 int dbase_llist_needs_resync(semanage_handle_t * handle, dbase_llist_t * dbase) in dbase_llist_needs_resync() argument
21 if (dbase->cache_serial < 0) in dbase_llist_needs_resync()
28 if (cache_serial != dbase->cache_serial) { in dbase_llist_needs_resync()
29 dbase_llist_drop_cache(dbase); in dbase_llist_needs_resync()
30 dbase->cache_serial = -1; in dbase_llist_needs_resync()
38 dbase_llist_t * dbase, const record_t * data) in dbase_llist_cache_prepend() argument
46 if (dbase->rtable->clone(handle, data, &entry->data) < 0) in dbase_llist_cache_prepend()
50 entry->next = dbase->cache; in dbase_llist_cache_prepend()
53 if (dbase->cache != NULL) in dbase_llist_cache_prepend()
54 dbase->cache->prev = entry; in dbase_llist_cache_prepend()
[all …]
Ddatabase_policydb.c44 static void dbase_policydb_drop_cache(dbase_policydb_t * dbase) in dbase_policydb_drop_cache() argument
47 if (dbase->cache_serial >= 0) { in dbase_policydb_drop_cache()
48 sepol_policydb_free(dbase->policydb); in dbase_policydb_drop_cache()
49 dbase->cache_serial = -1; in dbase_policydb_drop_cache()
50 dbase->modified = 0; in dbase_policydb_drop_cache()
55 dbase_policydb_t * dbase) in dbase_policydb_set_serial() argument
64 dbase->cache_serial = cache_serial; in dbase_policydb_set_serial()
69 dbase_policydb_t * dbase) in dbase_policydb_needs_resync() argument
74 if (dbase->cache_serial < 0) in dbase_policydb_needs_resync()
81 if (cache_serial != dbase->cache_serial) { in dbase_policydb_needs_resync()
[all …]
Ddatabase_llist.h34 static inline void dbase_llist_cache_init(dbase_llist_t * dbase) in dbase_llist_cache_init() argument
37 dbase->cache = NULL; in dbase_llist_cache_init()
38 dbase->cache_tail = NULL; in dbase_llist_cache_init()
39 dbase->cache_sz = 0; in dbase_llist_cache_init()
40 dbase->cache_serial = -1; in dbase_llist_cache_init()
41 dbase->modified = 0; in dbase_llist_cache_init()
44 static inline void dbase_llist_init(dbase_llist_t * dbase, in dbase_llist_init() argument
49 dbase->rtable = rtable; in dbase_llist_init()
50 dbase->dtable = dtable; in dbase_llist_init()
51 dbase_llist_cache_init(dbase); in dbase_llist_init()
[all …]
Dhandle.h108 dbase_config_t dbase[DBASE_COUNT]; member
115 return &handle->dbase[DBASE_LOCAL_USERS_BASE]; in semanage_user_base_dbase_local()
121 return &handle->dbase[DBASE_LOCAL_USERS_EXTRA]; in semanage_user_extra_dbase_local()
127 return &handle->dbase[DBASE_LOCAL_USERS]; in semanage_user_dbase_local()
133 return &handle->dbase[DBASE_LOCAL_PORTS]; in semanage_port_dbase_local()
139 return &handle->dbase[DBASE_LOCAL_INTERFACES]; in semanage_iface_dbase_local()
145 return &handle->dbase[DBASE_LOCAL_BOOLEANS]; in semanage_bool_dbase_local()
151 return &handle->dbase[DBASE_LOCAL_FCONTEXTS]; in semanage_fcontext_dbase_local()
157 return &handle->dbase[DBASE_LOCAL_SEUSERS]; in semanage_seuser_dbase_local()
163 return &handle->dbase[DBASE_LOCAL_NODES]; in semanage_node_dbase_local()
[all …]
Ddatabase_join.c37 static int dbase_join_cache(semanage_handle_t * handle, dbase_join_t * dbase) in dbase_join_cache() argument
41 dbase_t *dbase1 = dbase->join1->dbase; in dbase_join_cache()
42 dbase_t *dbase2 = dbase->join2->dbase; in dbase_join_cache()
43 dbase_table_t *dtable1 = dbase->join1->dtable; in dbase_join_cache()
44 dbase_table_t *dtable2 = dbase->join2->dtable; in dbase_join_cache()
45 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_join_cache()
46 record_join_table_t *rjtable = dbase->rjtable; in dbase_join_cache()
57 if (!dbase_llist_needs_resync(handle, &dbase->llist)) in dbase_join_cache()
61 dbase_llist_cache_init(&dbase->llist); in dbase_join_cache()
62 if (dbase_llist_set_serial(handle, &dbase->llist) < 0) in dbase_join_cache()
[all …]
Ddatabase_activedb.c33 dbase_activedb_t * dbase) in dbase_activedb_cache() argument
36 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_activedb_cache()
37 record_activedb_table_t *ratable = dbase->ratable; in dbase_activedb_cache()
44 if (!dbase_llist_needs_resync(handle, &dbase->llist)) in dbase_activedb_cache()
48 dbase_llist_cache_init(&dbase->llist); in dbase_activedb_cache()
49 if (dbase_llist_set_serial(handle, &dbase->llist) < 0) in dbase_activedb_cache()
58 if (dbase_llist_cache_prepend(handle, &dbase->llist, records[i]) in dbase_activedb_cache()
71 dbase_llist_drop_cache(&dbase->llist); in dbase_activedb_cache()
77 dbase_activedb_t * dbase) in dbase_activedb_flush() argument
80 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_activedb_flush()
[all …]
Ddatabase_file.c40 static int dbase_file_cache(semanage_handle_t * handle, dbase_file_t * dbase) in dbase_file_cache() argument
43 record_table_t *rtable = dbase_llist_get_rtable(&dbase->llist); in dbase_file_cache()
44 record_file_table_t *rftable = dbase->rftable; in dbase_file_cache()
53 if (!dbase_llist_needs_resync(handle, &dbase->llist)) in dbase_file_cache()
57 dbase_llist_cache_init(&dbase->llist); in dbase_file_cache()
58 if (dbase_llist_set_serial(handle, &dbase->llist) < 0) in dbase_file_cache()
61 fname = dbase->path[handle->is_in_transaction]; in dbase_file_cache()
88 if (dbase_llist_cache_prepend(handle, &dbase->llist, in dbase_file_cache()
109 dbase_llist_drop_cache(&dbase->llist); in dbase_file_cache()
114 static int dbase_file_flush(semanage_handle_t * handle, dbase_file_t * dbase) in dbase_file_flush() argument
[all …]
Ddatabase.h69 dbase_t * dbase,
77 dbase_t * dbase,
84 dbase_t * dbase,
89 dbase_t * dbase, const record_key_t * key);
94 int (*clear) (struct semanage_handle * handle, dbase_t * dbase);
103 dbase_t * dbase,
108 dbase_t * dbase,
113 dbase_t * dbase, unsigned int *response);
132 dbase_t * dbase,
142 dbase_t * dbase,
[all …]
Dpolicy_components.c26 record_table_t *rtable = src_dtable->get_rtable(src->dbase); in clear_obsolete()
34 if (dst_dtable->exists(handle, dst->dbase, key, &exists) < 0) in clear_obsolete()
38 if (src_dtable->del(handle, src->dbase, key) < 0) in clear_obsolete()
67 dbase_t *dbase = dst->dbase; in load_records() local
69 record_table_t *rtable = dtable->get_rtable(dbase); in load_records()
81 dtable->set(handle, dbase, rkey, records[i]) < 0) in load_records()
85 dtable->modify(handle, dbase, rkey, records[i]) < 0) in load_records()
152 record_table_t *rtable = src->dtable->get_rtable(src->dbase); in semanage_base_merge_components()
155 if (src->dtable->cache(handle, src->dbase) < 0) in semanage_base_merge_components()
157 if (dst->dtable->cache(handle, dst->dbase) < 0) in semanage_base_merge_components()
[all …]
Ddatabase.c39 if (dconfig->dtable->cache(handle, dconfig->dbase) < 0) in enter_ro()
72 if (dconfig->dtable->cache(handle, dconfig->dbase) < 0) in enter_rw()
90 if (dconfig->dtable->modify(handle, dconfig->dbase, key, data) < 0) in dbase_modify()
104 if (dconfig->dtable->set(handle, dconfig->dbase, key, data) < 0) in dbase_set()
117 if (dconfig->dtable->del(handle, dconfig->dbase, key) < 0) in dbase_del()
131 if (dconfig->dtable->query(handle, dconfig->dbase, key, response) < 0) { in dbase_query()
147 if (dconfig->dtable->exists(handle, dconfig->dbase, key, response) < 0) { in dbase_exists()
162 if (dconfig->dtable->count(handle, dconfig->dbase, response) < 0) { in dbase_count()
179 if (dconfig->dtable->iterate(handle, dconfig->dbase, fn, fn_arg) < 0) { in dbase_iterate()
195 if (dconfig->dtable->list(handle, dconfig->dbase, records, count) < 0) { in dbase_list()
Ddatabase_policydb.h93 dbase_policydb_t ** dbase);
99 extern void dbase_policydb_attach(dbase_policydb_t * dbase,
104 extern void dbase_policydb_detach(dbase_policydb_t * dbase);
107 extern void dbase_policydb_release(dbase_policydb_t * dbase);
Ddatabase_activedb.h29 dbase_activedb_t ** dbase);
32 extern void dbase_activedb_release(dbase_activedb_t * dbase);
Ddatabase_file.h35 dbase_file_t ** dbase);
38 extern void dbase_file_release(dbase_file_t * dbase);
Ddatabase_join.h39 dbase_config_t * join2, dbase_join_t ** dbase);
42 extern void dbase_join_release(dbase_join_t * dbase);
Dusers_join.c38 join1, join2, &dconfig->dbase) < 0) in user_join_dbase_init()
48 dbase_join_release(dconfig->dbase); in user_join_dbase_release()
Ddirect_api.c600 pusers_extra->dtable->drop_cache(pusers_extra->dbase); in semanage_direct_update_user_extra()
603 retval = pusers_extra->dtable->clear(sh, pusers_extra->dbase); in semanage_direct_update_user_extra()
633 pseusers->dtable->drop_cache(pseusers->dbase); in semanage_direct_update_seuser()
635 retval = pseusers->dtable->clear(sh, pseusers->dbase); in semanage_direct_update_seuser()
1149 if (users->dtable->is_modified(users->dbase)) { in semanage_direct_commit()
1150 retval = users->dtable->flush(sh, users->dbase); in semanage_direct_commit()
1156 fcontexts_modified = fcontexts->dtable->is_modified(fcontexts->dbase); in semanage_direct_commit()
1157 seusers_modified = seusers->dtable->is_modified(seusers->dbase); in semanage_direct_commit()
1159 users_extra->dtable->is_modified(users_extra->dbase); in semanage_direct_commit()
1160 ports_modified = ports->dtable->is_modified(ports->dbase); in semanage_direct_commit()
[all …]
Dports_policydb.c57 &dconfig->dbase) < 0) in port_policydb_dbase_init()
68 dbase_policydb_release(dconfig->dbase); in port_policydb_dbase_release()
Dnodes_policydb.c57 &dconfig->dbase) < 0) in node_policydb_dbase_init()
68 dbase_policydb_release(dconfig->dbase); in node_policydb_dbase_release()
Dinterfaces_policydb.c58 &dconfig->dbase) < 0) in iface_policydb_dbase_init()
68 dbase_policydb_release(dconfig->dbase); in iface_policydb_dbase_release()
Dusers_base_policydb.c57 &dconfig->dbase) < 0) in user_base_policydb_dbase_init()
67 dbase_policydb_release(dconfig->dbase); in user_base_policydb_dbase_release()
Dbooleans_policydb.c62 &dconfig->dbase) < 0) in bool_policydb_dbase_init()
72 dbase_policydb_release(dconfig->dbase); in bool_policydb_dbase_release()
Dbooleans_file.c119 &SEMANAGE_BOOL_FILE_RTABLE, &dconfig->dbase) < 0) in bool_file_dbase_init()
129 dbase_file_release(dconfig->dbase); in bool_file_dbase_release()
/external/iproute2/misc/
Darpd.c43 DB *dbase; variable
311 dbase->sync(dbase, 0); in do_one_request()
344 if (dbase->get(dbase, &dbkey, &dbdat, 0) != 0) { in do_one_request()
368 dbase->del(dbase, &dbkey, 0); in do_one_request()
394 dbase->put(dbase, &dbkey, &dbdat, 0); in do_one_request()
412 dbase->put(dbase, &dbkey, &dbdat, 0); in do_one_request()
424 dbase->put(dbase, &dbkey, &dbdat, 0); in do_one_request()
527 if (dbase->get(dbase, &dbkey, &dbdat, 0) == 0 && !IS_NEG(dbdat.data)) { in get_arp_pkt()
537 dbase->put(dbase, &dbkey, &dbdat, 0); in get_arp_pkt()
683 dbase = dbopen(dbname, O_CREAT|O_RDWR, 0644, DB_HASH, NULL); in main()
[all …]
/external/opencv/cv/src/
Dcvdistransform.cpp633 uchar *dbase = dst->data.ptr; in icvDistanceATS_L1_8u() local
645 dbase[0] = (uchar)(sbase[0] == 0 ? 0 : 255); in icvDistanceATS_L1_8u()
649 dbase[x] = (uchar)(sbase[x] == 0 ? 0 : lut[dbase[x-1]]); in icvDistanceATS_L1_8u()
654 dbase += dststep; in icvDistanceATS_L1_8u()
657 a = sbase[0] == 0 ? 0 : lut[dbase[-dststep]]; in icvDistanceATS_L1_8u()
658 dbase[0] = (uchar)a; in icvDistanceATS_L1_8u()
662 a = sbase[x] == 0 ? 0 : lut[MIN(a, dbase[x - dststep])]; in icvDistanceATS_L1_8u()
663 dbase[x] = (uchar)a; in icvDistanceATS_L1_8u()
669 a = dbase[width-1]; in icvDistanceATS_L1_8u()
675 dbase[x] = (uchar)(CV_CALC_MIN_8U(a, dbase[x])); in icvDistanceATS_L1_8u()
[all …]
/external/opencv3/modules/imgproc/src/
Ddistransform.cpp613 uchar *dbase = dst.ptr(); in distanceATS_L1_8u() local
625 dbase[0] = (uchar)(sbase[0] == 0 ? 0 : 255); in distanceATS_L1_8u()
629 dbase[x] = (uchar)(sbase[x] == 0 ? 0 : lut[dbase[x-1]]); in distanceATS_L1_8u()
634 dbase += dststep; in distanceATS_L1_8u()
637 a = sbase[0] == 0 ? 0 : lut[dbase[-dststep]]; in distanceATS_L1_8u()
638 dbase[0] = (uchar)a; in distanceATS_L1_8u()
642 a = sbase[x] == 0 ? 0 : lut[MIN(a, dbase[x - dststep])]; in distanceATS_L1_8u()
643 dbase[x] = (uchar)a; in distanceATS_L1_8u()
649 a = dbase[width-1]; in distanceATS_L1_8u()
655 dbase[x] = (uchar)(CV_CALC_MIN_8U(a, dbase[x])); in distanceATS_L1_8u()
[all …]

12