Lines Matching refs:scontext
93 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()
165 context_init(scontext); in context_from_record()
174 scontext->user = usrdatum->s.value; in context_from_record()
183 scontext->role = roldatum->s.value; in context_from_record()
192 scontext->type = typdatum->s.value; in context_from_record()
203 if (mls && (mls_from_string(handle, policydb, mls, scontext) < 0)) in context_from_record()
207 if (!context_is_valid(policydb, scontext)) { in context_from_record()
220 *cptr = scontext; in context_from_record()
228 context_destroy(scontext); in context_from_record()
231 free(scontext); in context_from_record()