Lines Matching refs:fout
48 FILE *fout;
55 fout = fopen(argv[1], "w");
56 if (!fout) {
62 fprintf(fout, "/* This file is automatically generated. Do not edit. */\n");
63 fprintf(fout, "#ifndef _SELINUX_FLASK_H_\n#define _SELINUX_FLASK_H_\n\n");
68 fprintf(fout, "#define SECCLASS_%-39s %2d\n", name, i+1);
72 fprintf(fout, "\n");
80 fprintf(fout, "#define SECINITSID_%-39s %2d\n", sidname, i);
84 fprintf(fout, "\n#define SECINITSID_NUM %d\n", i-1);
85 fprintf(fout, "\nstatic inline bool security_is_socket_class(u16 kern_tclass)\n");
86 fprintf(fout, "{\n");
87 fprintf(fout, "\tbool sock = false;\n\n");
88 fprintf(fout, "\tswitch (kern_tclass) {\n");
97 fprintf(fout, "\tcase SECCLASS_%s:\n", name);
100 fprintf(fout, "\t\tsock = true;\n");
101 fprintf(fout, "\t\tbreak;\n");
102 fprintf(fout, "\tdefault:\n");
103 fprintf(fout, "\t\tbreak;\n");
104 fprintf(fout, "\t}\n\n");
105 fprintf(fout, "\treturn sock;\n");
106 fprintf(fout, "}\n");
108 fprintf(fout, "\n#endif\n");
110 if (fclose(fout) != 0) {
116 fout = fopen(argv[2], "w");
117 if (!fout) {
123 fprintf(fout, "/* This file is automatically generated. Do not edit. */\n");
124 fprintf(fout, "#ifndef _SELINUX_AV_PERMISSIONS_H_\n#define _SELINUX_AV_PERMISSIONS_H_\n\n");
141 fprintf(fout, "#define %s__%-*s 0x%08xU\n", name,
148 fprintf(fout, "\n#endif\n");
150 if (fclose(fout) != 0) {