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