Lines Matching refs:policydb
43 const policydb_t * policydb, in mls_to_string() argument
50 int len = mls_compute_context_len(policydb, mls) + 1; in mls_to_string()
61 mls_sid_to_context(policydb, mls, &ptr); in mls_to_string()
79 const policydb_t * policydb, in mls_from_string() argument
88 if (mls_context_to_sid(policydb, '$', &tmp_cp, mls) < 0) { in mls_from_string()
109 int mls_compute_context_len(const policydb_t * policydb, in mls_compute_context_len() argument
116 if (!policydb->mls) in mls_compute_context_len()
123 strlen(policydb-> in mls_compute_context_len()
135 strlen(policydb->p_cat_val_to_name[i]) + 1; in mls_compute_context_len()
140 strlen(policydb-> in mls_compute_context_len()
148 len += strlen(policydb->p_cat_val_to_name[i - 1]) + 1; in mls_compute_context_len()
167 void mls_sid_to_context(const policydb_t * policydb, in mls_sid_to_context() argument
175 if (!policydb->mls) in mls_sid_to_context()
187 policydb->p_sens_val_to_name[context->range.level[l]. in mls_sid_to_context()
190 strlen(policydb-> in mls_sid_to_context()
207 policydb->p_cat_val_to_name[i]); in mls_sid_to_context()
209 strlen(policydb->p_cat_val_to_name[i]); in mls_sid_to_context()
219 policydb->p_cat_val_to_name[i - in mls_sid_to_context()
222 strlen(policydb-> in mls_sid_to_context()
235 strcpy(scontextp, policydb->p_cat_val_to_name[i - 1]); in mls_sid_to_context()
236 scontextp += strlen(policydb->p_cat_val_to_name[i - 1]); in mls_sid_to_context()
329 int mls_context_to_sid(const policydb_t * policydb, in mls_context_to_sid() argument
339 if (!policydb->mls) in mls_context_to_sid()
357 (level_datum_t *) hashtab_search(policydb->p_levels.table, in mls_context_to_sid()
382 (cat_datum_t *) hashtab_search(policydb-> in mls_context_to_sid()
399 hashtab_search(policydb->p_cats. in mls_context_to_sid()
605 int mls_compute_sid(policydb_t * policydb, in mls_compute_sid() argument
612 if (!policydb->mls) in mls_compute_sid()
618 for (rtr = policydb->range_tr; rtr; rtr = rtr->next) { in mls_compute_sid()
652 sepol_policydb_t * policydb, in sepol_mls_contains() argument
664 if (mls_from_string(handle, &policydb->p, mls1, ctx1) < 0) in sepol_mls_contains()
667 if (mls_from_string(handle, &policydb->p, mls2, ctx2) < 0) in sepol_mls_contains()
691 sepol_policydb_t * policydb, const char *mls) in sepol_mls_check() argument
703 ret = mls_from_string(handle, &policydb->p, mls, con); in sepol_mls_check()