Lines Matching refs:scontext

386 static int constraint_expr_eval_reason(context_struct_t *scontext,  in constraint_expr_eval_reason()  argument
497 val1 = scontext->user; in constraint_expr_eval_reason()
503 val1 = scontext->type; in constraint_expr_eval_reason()
509 val1 = scontext->role; in constraint_expr_eval_reason()
538 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
544 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
550 l1 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
556 l1 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
562 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
563 l2 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
627 c = scontext; in constraint_expr_eval_reason()
829 static int context_struct_compute_av(context_struct_t * scontext,
838 static void type_attribute_bounds_av(context_struct_t *scontext, in type_attribute_bounds_av() argument
852 source = policydb->type_val_to_struct[scontext->type - 1]; in type_attribute_bounds_av()
860 memcpy(&lo_scontext, scontext, sizeof(lo_scontext)); in type_attribute_bounds_av()
893 static int context_struct_compute_av(context_struct_t * scontext, in context_struct_compute_av() argument
934 sattr = &policydb->type_attr_map[scontext->type - 1]; in context_struct_compute_av()
977 !constraint_expr_eval_reason(scontext, tcontext, NULL, in context_struct_compute_av()
998 scontext->role != tcontext->role) { in context_struct_compute_av()
1000 if (scontext->role == ra->role && in context_struct_compute_av()
1015 type_attribute_bounds_av(scontext, tcontext, tclass, requested, avd, in context_struct_compute_av()
1136 context_struct_t *scontext = 0, *tcontext = 0; in sepol_compute_av_reason() local
1139 scontext = sepol_sidtab_search(sidtab, ssid); in sepol_compute_av_reason()
1140 if (!scontext) { in sepol_compute_av_reason()
1152 rc = context_struct_compute_av(scontext, tcontext, tclass, in sepol_compute_av_reason()
1172 context_struct_t *scontext = 0, *tcontext = 0; in sepol_compute_av_reason_buffer() local
1175 scontext = sepol_sidtab_search(sidtab, ssid); in sepol_compute_av_reason_buffer()
1176 if (!scontext) { in sepol_compute_av_reason_buffer()
1199 rc = context_struct_compute_av(scontext, tcontext, tclass, in sepol_compute_av_reason_buffer()
1285 sepol_security_context_t * scontext, in sepol_sid_to_context() argument
1297 rc = context_to_string(NULL, policydb, context, scontext, scontext_len); in sepol_sid_to_context()
1307 int hidden sepol_context_to_sid(const sepol_security_context_t scontext, in sepol_context_to_sid() argument
1315 scontext, scontext_len) < 0) in sepol_context_to_sid()
1331 ERR(NULL, "could not convert %s to sid", scontext); in sepol_context_to_sid()
1336 scontext, in compute_sid_handle_invalid_context()
1350 context_to_string(NULL, policydb, scontext, &s, &slen); in compute_sid_handle_invalid_context()
1368 context_struct_t *scontext = 0, *tcontext = 0, newcontext; in sepol_compute_sid() local
1375 scontext = sepol_sidtab_search(sidtab, ssid); in sepol_compute_sid()
1376 if (!scontext) { in sepol_compute_sid()
1395 newcontext.user = scontext->user; in sepol_compute_sid()
1407 newcontext.role = scontext->role; in sepol_compute_sid()
1408 newcontext.type = scontext->type; in sepol_compute_sid()
1418 avkey.source_type = scontext->type; in sepol_compute_sid()
1448 if (roletr->role == scontext->role && in sepol_compute_sid()
1463 rc = mls_compute_sid(policydb, scontext, tcontext, tclass, specified, in sepol_compute_sid()
1470 rc = compute_sid_handle_invalid_context(scontext, in sepol_compute_sid()