Home | History | Annotate | Download | only in tools

Lines Matching refs:sepolicy

43     } sepolicy;
93 int bit_pos = get_attr_bit(global_state.sepolicy.pdb, *attributes);
159 int rc = sepol_context_from_string(global_state.sepolicy.handle, context,
166 rc = sepol_context_check(global_state.sepolicy.handle,
167 global_state.sepolicy.sdb, ctx);
176 res = !is_type_of_attribute_set(global_state.sepolicy.pdb, type_name,
196 fprintf(stderr, "usage1: %s [-l|-p|-s|-v] [-e] sepolicy context_file\n\n"
213 if (global_state.sepolicy.file) {
214 fclose(global_state.sepolicy.file);
217 if (global_state.sepolicy.sdb) {
218 sepol_policydb_free(global_state.sepolicy.sdb);
221 if (global_state.sepolicy.pf) {
222 sepol_policy_file_free(global_state.sepolicy.pf);
225 if (global_state.sepolicy.handle) {
226 sepol_handle_destroy(global_state.sepolicy.handle);
233 struct selabel_handle *sehnd = global_state.sepolicy.sehnd[i];
250 global_state.sepolicy.sehnd[i] = selabel_open(backend, opts, 2);
251 if (!global_state.sepolicy.sehnd[i]) {
257 result = selabel_cmp(global_state.sepolicy.sehnd[0], global_state.sepolicy.sehnd[1]);
278 global_state.sepolicy.file = fopen(sepolicy_file, "r");
279 if (!global_state.sepolicy.file) {
284 global_state.sepolicy.handle = sepol_handle_create();
285 if (!global_state.sepolicy.handle) {
290 if (sepol_policy_file_create(&global_state.sepolicy.pf) < 0) {
295 sepol_policy_file_set_fp(global_state.sepolicy.pf, global_state.sepolicy.file);
296 sepol_policy_file_set_handle(global_state.sepolicy.pf, global_state.sepolicy.handle);
298 int rc = sepol_policydb_create(&global_state.sepolicy.sdb);
304 rc = sepol_policydb_read(global_state.sepolicy.sdb, global_state.sepolicy.pf);
323 global_state.sepolicy.sehnd[0] = selabel_open(backend, opts, 2);
324 if (!global_state.sepolicy.sehnd[0]) {
391 /* remaining args are sepolicy file and context file */