Lines Matching refs:scontext
94 char *scontext = NULL; in context_to_string() local
110 scontext = malloc(scontext_len); in context_to_string()
111 if (!scontext) in context_to_string()
113 scontext[scontext_len - 1] = '\0'; in context_to_string()
118 ptr = scontext; in context_to_string()
131 *result = scontext; in context_to_string()
137 free(scontext); in context_to_string()
150 context_struct_t *scontext = NULL; in context_from_record() local
161 scontext = (context_struct_t *) malloc(sizeof(context_struct_t)); in context_from_record()
162 if (!user || !role || !type || !scontext) { in context_from_record()
166 context_init(scontext); in context_from_record()
175 scontext->user = usrdatum->s.value; in context_from_record()
184 scontext->role = roldatum->s.value; in context_from_record()
193 scontext->type = typdatum->s.value; in context_from_record()
204 if (mls && (mls_from_string(handle, policydb, mls, scontext) < 0)) in context_from_record()
208 if (!context_is_valid(policydb, scontext)) { in context_from_record()
221 *cptr = scontext; in context_from_record()
229 context_destroy(scontext); in context_from_record()
232 free(scontext); in context_from_record()