Home | History | Annotate | Download | only in test

Lines Matching refs:fp

75 			       FILE * fp)
78 fprintf(fp, "{");
81 fprintf(fp, "%s ", perm);
82 fprintf(fp, "}");
86 policydb_t * p, FILE * fp)
90 fprintf(fp, "{");
95 fprintf(fp, " %s", perm);
98 fprintf(fp, " }");
101 static void display_id(policydb_t * p, FILE * fp, uint32_t symbol_type,
109 fprintf(fp, " [%s%s]", prefix, id);
111 fprintf(fp, " %s%s", prefix, id);
116 FILE * fp)
121 fprintf(fp, " * ");
124 fprintf(fp, " ~");
153 fprintf(fp, "{");
159 display_id(policy, fp, SYM_TYPES, i, "");
166 display_id(policy, fp, SYM_TYPES, i, "-");
170 fprintf(fp, " self");
174 fprintf(fp, " }");
179 int display_mod_role_set(role_set_t * roles, policydb_t * p, FILE * fp)
184 fprintf(fp, " * ");
187 fprintf(fp, " ~");
196 fprintf(fp, "{");
204 display_id(p, fp, SYM_ROLES, i, "");
208 fprintf(fp, " }");
215 FILE * fp)
221 fprintf(fp, " <empty>\n");
226 fprintf(fp, " allow");
229 fprintf(fp, " auditallow ");
232 fprintf(fp, " dontaudit");
236 fprintf(fp, " type_transition");
239 fprintf(fp, " type_member");
242 fprintf(fp, " type_change");
245 fprintf(fp, " neverallow");
247 fprintf(fp, " ERROR: no valid rule type specified\n");
251 if (display_type_set(&avrule->stypes, 0, policy, fp))
254 if (display_type_set(&avrule->ttypes, avrule->flags, policy, fp))
257 fprintf(fp, " :");
268 fprintf(fp, " {");
272 display_id(policy, fp, SYM_CLASSES, cur->class - 1, "");
277 fprintf(fp, " }");
278 fprintf(fp, " ");
282 policy, fp);
284 display_id(policy, fp, SYM_TYPES, avrule->perms->data - 1, "");
287 fprintf(fp, ";\n");
295 FILE *fp;
299 fp = (FILE *) data;
302 display_id(&policydb, fp, SYM_TYPES, type->s.value - 1, "");
303 fprintf(fp, " [%d]: ", type->s.value);
308 fprintf(fp, " %s [%d]: ", (char *)key, type->s.value);
311 fprintf(fp, "attribute for types");
319 fprintf(fp, ",");
321 display_id(&policydb, fp, SYM_TYPES, i, "");
324 fprintf(fp, "type");
326 fprintf(fp, "alias for type");
327 display_id(&policydb, fp, SYM_TYPES, type->s.value - 1, "");
329 fprintf(fp, " flags:%x\n", type->flags);
334 int display_types(policydb_t * p, FILE * fp)
336 if (hashtab_map(p->p_types.table, display_type_callback, fp))
341 int display_users(policydb_t * p, FILE * fp)
346 display_id(p, fp, SYM_USERS, i, "");
347 fprintf(fp, ":");
352 display_id(p, fp, SYM_ROLES, j, "");
355 fprintf(fp, "\n");
360 int display_bools(policydb_t * p, FILE * fp)
365 display_id(p, fp, SYM_BOOLS, i, "");
366 fprintf(fp, " : %d\n", p->bool_val_to_struct[i]->state);
371 void display_expr(policydb_t * p, cond_expr_t * exp, FILE * fp)
378 fprintf(fp, "%s ",
382 fprintf(fp, "! ");
385 fprintf(fp, "|| ");
388 fprintf(fp, "&& ");
391 fprintf(fp, "^ ");
394 fprintf(fp, "== ");
397 fprintf(fp, "!= ");
400 fprintf(fp, "error!");
406 void display_policycon(FILE * fp)
410 fprintf(fp, "Sorry, not implemented\n");
413 void display_initial_sids(policydb_t * p, FILE * fp)
418 fprintf(fp, "Initial SIDs:\n");
423 fprintf(fp, "\t%s: sid %d, context %s:%s:%s\n",
427 fprintf(fp, "Policy Initial SIDs:\n");
432 fprintf(fp, "\t%s: sid %d, context %s:%s:%s\n",
438 void display_class_set(ebitmap_t *classes, policydb_t *p, FILE *fp)
447 fprintf(fp, "{");
454 display_id(p, fp, SYM_CLASSES, i, "");
458 fprintf(fp, " }");
461 void display_role_trans(role_trans_rule_t * tr, policydb_t * p, FILE * fp)
464 fprintf(fp, "role transition ");
465 display_mod_role_set(&tr->roles, p, fp);
466 display_type_set(&tr->types, 0, p, fp);
467 fprintf(fp, " :");
468 display_class_set(&tr->classes, p, fp);
469 display_id(p, fp, SYM_ROLES, tr->new_role - 1, "");
470 fprintf(fp, "\n");
474 void display_role_allow(role_allow_rule_t * ra, policydb_t * p, FILE * fp)
477 fprintf(fp, "role allow ");
478 display_mod_role_set(&ra->roles, p, fp);
479 display_mod_role_set(&ra->new_roles, p, fp);
480 fprintf(fp, "\n");
484 static void display_filename_trans(filename_trans_rule_t * tr, policydb_t * p, FILE * fp)
486 fprintf(fp, "filename transition");
488 display_type_set(&tr->stypes, 0, p, fp);
489 display_type_set(&tr->ttypes, 0, p, fp);
490 display_id(p, fp, SYM_CLASSES, tr->tclass - 1, ":");
491 display_id(p, fp, SYM_TYPES, tr->otype - 1, "");
492 fprintf(fp, " %s\n", tr->name);
500 FILE *fp;
503 fp = (FILE *) data;
505 fprintf(fp, "role:");
506 display_id(&policydb, fp, SYM_ROLES, role->s.value - 1, "");
507 fprintf(fp, " types: ");
508 display_type_set(&role->types, 0, &policydb, fp);
509 fprintf(fp, "\n");
549 int display_cond_expressions(policydb_t * p, FILE * fp)
554 fprintf(fp, "expression: ");
555 display_expr(p, cur->expr, fp);
556 fprintf(fp, "current state: %d\n", cur->cur_state);
557 fprintf(fp, "True list:\n");
560 fprintf(fp, "\t");
562 RENDER_CONDITIONAL, p, fp);
564 fprintf(fp, "False list:\n");
567 fprintf(fp, "\t");
569 RENDER_CONDITIONAL, p, fp);
575 int change_bool(char *name, int state, policydb_t * p, FILE * fp)
581 fprintf(fp, "Could not find bool %s\n", name);
714 f.fp = in_fp;
790 static void display_policycaps(policydb_t * p, FILE * fp)
797 fprintf(fp, "policy capabilities:\n");
805 fprintf(fp, "\t%s\n", capname);