Lines Matching refs:policydb
5 #include <sepol/policydb/policydb.h>
6 #include <sepol/policydb/services.h>
88 const policydb_t * policydb,
99 strlen(policydb->p_user_val_to_name[context->user - 1]) + 1;
101 strlen(policydb->p_role_val_to_name[context->role - 1]) + 1;
102 scontext_len += strlen(policydb->p_type_val_to_name[context->type - 1]);
103 scontext_len += mls_compute_context_len(policydb, context);
119 policydb->p_user_val_to_name[context->user - 1],
120 policydb->p_role_val_to_name[context->role - 1],
121 policydb->p_type_val_to_name[context->type - 1]);
124 strlen(policydb->p_user_val_to_name[context->user - 1]) + 1 +
125 strlen(policydb->p_role_val_to_name[context->role - 1]) + 1 +
126 strlen(policydb->p_type_val_to_name[context->type - 1]);
128 mls_sid_to_context(policydb, context, &ptr);
144 const policydb_t * policydb,
168 usrdatum = (user_datum_t *) hashtab_search(policydb->p_users.table,
177 roldatum = (role_datum_t *) hashtab_search(policydb->p_roles.table,
186 typdatum = (type_datum_t *) hashtab_search(policydb->p_types.table,
195 if (mls && !policydb->mls) {
199 } else if (!mls && policydb->mls) {
203 if (mls && (mls_from_string(handle, policydb, mls, scontext) < 0))
207 if (!context_is_valid(policydb, scontext)) {
243 const policydb_t * policydb,
255 policydb->p_user_val_to_name[context->user -
260 policydb->p_role_val_to_name[context->role -
265 policydb->p_type_val_to_name[context->type -
269 if (policydb->mls) {
270 if (mls_to_string(handle, policydb, context, &mls) < 0)
292 const policydb_t * policydb,
311 if (context_from_record(handle, policydb, cptr, ctx_record) < 0)
329 const sepol_policydb_t * policydb,
334 int ret = context_from_record(handle, &policydb->p, &con, context);