Lines Matching defs:context

30 #include <sepol/context.h>
33 #include <sepol/policydb/context.h>
70 ERR(handle, "out of memory, could not convert mls context to string");
89 ERR(handle, "invalid MLS context %s", str);
101 ERR(handle, "could not construct mls context structure");
107 * security context string representation of `context'.
110 const context_struct_t * context)
124 p_sens_val_to_name[context->range.level[l].sens -
127 ebitmap_for_each_bit(&context->range.level[l].cat, cnode, i) {
151 if (mls_level_eq(&context->range.level[0],
152 &context->range.level[1]))
163 * Write the security context string representation of
164 * the MLS fields of `context' into the string `*scontext'.
168 const context_struct_t * context, char **scontext)
187 policydb->p_sens_val_to_name[context->range.level[l].
191 p_sens_val_to_name[context->range.level[l].sens -
194 ebitmap_for_each_bit(&context->range.level[l].cat, cnode, i) {
240 if (mls_level_eq(&context->range.level[0],
241 &context->range.level[1]))
255 * Return 1 if the MLS fields in the security context
320 * Set the MLS fields in the security context structure
321 * `context' based on the string representation in
330 char oldc, char **scontext, context_struct_t * context)
342 /* No MLS component to the security context */
363 context->range.level[l].sens = levdatum->level->sens;
390 (&context->range.level[l].cat,
413 (&context->range.level[l].
438 if (mls_level_cpy(&context->range.level[1],
439 &context->range.level[0]) < 0)
458 /* Copy the MLS range from the source context */
478 /* Copy the MLS range from the source context */
491 * Copies the MLS range `range' into `context'.
493 static inline int mls_range_set(context_struct_t * context, const mls_range_t * range)
497 /* Copy the MLS range into the context */
499 context->range.level[l].sens = range->level[l].sens;
500 rc = ebitmap_cpy(&context->range.level[l].cat,
548 * Convert the MLS fields in the security context
697 ERR(handle, "could not check if mls context %s contains %s",
714 "mls context %s is valid", mls);