Lines Matching defs:context
66 #include "context.h"
375 * only. For these rules, scontext is the context before the transition,
376 * tcontext is the context after the transition, and xcontext is the
377 * context of the process performing the transition. All other callers
902 * Compute access vectors based on a context structure pair for
1244 * Write the security context string representation of
1245 * the context associated with `sid' into a dynamically
1254 context_struct_t *context;
1257 context = sepol_sidtab_search(sidtab, sid);
1258 if (!context) {
1263 rc = context_to_string(NULL, policydb, context, scontext, scontext_len);
1270 * Return a SID associated with the security context that
1277 context_struct_t *context = NULL;
1279 /* First, create the context */
1280 if (context_from_string(NULL, policydb, &context,
1285 if (sid && (sepol_sidtab_context_to_sid(sidtab, context, sid) < 0))
1288 context_destroy(context);
1289 free(context);
1293 if (context) {
1294 context_destroy(context);
1295 free(context);
1319 ERR(NULL, "invalid context %s for "
1451 /* Check the validity of the context. */
1459 /* Obtain the sid for the context. */
1577 context_struct_t * context, void *arg)
1581 return sepol_sidtab_insert(s, sid, context);
1585 context)
1593 context_to_string(NULL, policydb, context, &s, &len);
1594 ERR(NULL, "context %s is invalid", s);
1606 * Convert the values in the security context
1610 * context is valid under the new policy.
1662 /* Check the validity of the new context. */
1675 ERR(NULL, "invalidating context %s", s);
1777 * Convert the context structures in the SID table to the
1876 &c->context[0],
1881 &c->context[1],
1919 &c->context[0],
1955 &c->context[0],
1993 &c->context[0],
2031 &c->context[0],
2036 &c->context[1],
2122 &c->context[0],
2271 &c->context[0], &c->sid[0]);
2298 &c->context[0],