Home
last modified time | relevance | path

Searched refs:scontext (Results 1 – 7 of 7) sorted by relevance

/external/libsepol/src/
Dcontext.c93 char *scontext = NULL; in context_to_string() local
109 scontext = malloc(scontext_len); in context_to_string()
110 if (!scontext) in context_to_string()
112 scontext[scontext_len - 1] = '\0'; in context_to_string()
117 ptr = scontext; in context_to_string()
130 *result = scontext; in context_to_string()
136 free(scontext); in context_to_string()
149 context_struct_t *scontext = NULL; in context_from_record() local
160 scontext = (context_struct_t *) malloc(sizeof(context_struct_t)); in context_from_record()
161 if (!user || !role || !type || !scontext) { in context_from_record()
[all …]
Dgenusers.c177 char *scontext, *r, *s; local
200 scontext = malloc(p - q);
201 if (!scontext) {
207 r = scontext;
215 r = scontext;
220 ERR(NULL, "invalid level %s (%s:%u)", scontext,
222 free(scontext);
226 free(scontext);
246 scontext = malloc(p - q);
247 if (!scontext) {
[all …]
Dservices.c125 static int constraint_expr_eval(context_struct_t * scontext, in constraint_expr_eval() argument
159 val1 = scontext->user; in constraint_expr_eval()
163 val1 = scontext->type; in constraint_expr_eval()
167 val1 = scontext->role; in constraint_expr_eval()
194 l1 = &(scontext->range.level[0]); in constraint_expr_eval()
198 l1 = &(scontext->range.level[0]); in constraint_expr_eval()
202 l1 = &(scontext->range.level[1]); in constraint_expr_eval()
206 l1 = &(scontext->range.level[1]); in constraint_expr_eval()
210 l1 = &(scontext->range.level[0]); in constraint_expr_eval()
211 l2 = &(scontext->range.level[1]); in constraint_expr_eval()
[all …]
Dmls.h45 char **scontext);
50 char **scontext, context_struct_t * context);
59 context_struct_t * scontext,
Dmls.c168 const context_struct_t * context, char **scontext) in mls_sid_to_context() argument
178 scontextp = *scontext; in mls_sid_to_context()
250 *scontext = scontextp; in mls_sid_to_context()
330 char oldc, char **scontext, context_struct_t * context) in mls_context_to_sid() argument
347 scontextp = p = *scontext; in mls_context_to_sid()
442 *scontext = ++p; in mls_context_to_sid()
606 context_struct_t * scontext, in mls_compute_sid() argument
619 if (rtr->source_type == scontext->type && in mls_compute_sid()
631 return mls_copy_context(newcontext, scontext); in mls_compute_sid()
634 return mls_scopy_context(newcontext, scontext); in mls_compute_sid()
[all …]
/external/libsepol/include/sepol/policydb/
Dservices.h97 sepol_security_context_t * scontext, /* OUT */
104 extern int sepol_context_to_sid(const sepol_security_context_t scontext, /* IN */
/external/checkpolicy/
Dcheckpolicy.c125 sepol_security_context_t scontext; in print_sid() local
129 rc = sepol_sid_to_context(sid, &scontext, &scontext_len); in print_sid()
133 printf("sid %d -> scontext %s\n", sid, scontext); in print_sid()
134 free(scontext); in print_sid()
381 sepol_security_context_t scontext; in main() local
733 &scontext, &scontext_len); in main()
736 printf("\nscontext %s\n", scontext); in main()
737 free(scontext); in main()