printf("/* This file is automatically generated. Do not edit. */\n") > avpermfile;
;
}
-/^[ \t]*#/ {
+/^[ \t]*#/ {
next;
}
$1 == "class" {
nextstate != "CLASS_OR_CLASS-OPENBRACKET")
{
printf("Parse error: Unexpected class definition on line %d\n", NR);
- next;
+ next;
}
tclass = $2;
{
printf("Duplicate access vector definition for %s on line %d\n", tclass, NR);
next;
- }
+ }
av_defined[tclass] = 1;
permission = 0;
nextstate = "INHERITS_OR_CLASS-OPENBRACKET";
next;
}
-$1 == "{" {
+$1 == "{" {
if (nextstate != "INHERITS_OR_CLASS-OPENBRACKET" &&
nextstate != "CLASS_OR_CLASS-OPENBRACKET" &&
nextstate != "COMMON-OPENBRACKET")
if (nextstate != "COMMON-CLOSEBRACKET" &&
nextstate != "CLASS-CLOSEBRACKET")
{
- printf("Parse error: Unexpected symbol %s on line %d\n", $1, NR);
+ printf("Parse error: Unexpected symbol %s on line %d\n", $1, NR);
next;
}
common_perms[common_name,$1] = permission;
- printf("#define COMMON_%s__%s", toupper(common_name), toupper($1)) > outfile;
+ printf("#define COMMON_%s__%s", toupper(common_name), toupper($1)) > outfile;
printf(" S_(\"%s\")\n", $1) > cpermfile;
}
}
av_perms[tclass,$1] = permission;
-
- printf("#define %s__%s", toupper(tclass), toupper($1)) > outfile;
- printf(" S_(SECCLASS_%s, %s__%s, \"%s\")\n", toupper(tclass), toupper(tclass), toupper($1), $1) > avpermfile;
+ printf("#define %s__%s", toupper(tclass), toupper($1)) > outfile;
+
+ printf(" S_(SECCLASS_%s, %s__%s, \"%s\")\n", toupper(tclass), toupper(tclass), toupper($1), $1) > avpermfile;
}
spaces = 40 - (length($1) + length(tclass));
if (spaces < 1)
spaces = 1;
- for (i = 0; i < spaces; i++)
- printf(" ") > outfile;
+ for (i = 0; i < spaces; i++)
+ printf(" ") > outfile;
printf("(1UL << %u)\n", permission) > outfile;
permission = permission + 1;
}
$1 == "}" {
- if (nextstate != "CLASS-CLOSEBRACKET" &&
+ if (nextstate != "CLASS-CLOSEBRACKET" &&
nextstate != "COMMON-CLOSEBRACKET")
{
printf("Parse error: Unexpected } on line %d\n", NR);
if (nextstate == "COMMON-CLOSEBRACKET")
{
common_base[common_name] = permission;
- printf("TE_(common_%s_perm_to_string)\n\n", common_name) > cpermfile;
+ printf("TE_(common_%s_perm_to_string)\n\n", common_name) > cpermfile;
}
printf("\n") > outfile;
printf("static char *initial_sid_to_string[] =\n{\n") > debugfile2;
printf(" \"null\",\n") > debugfile2;
}
-/^[ \t]*#/ {
+/^[ \t]*#/ {
next;
}
-$1 == "class" {
+$1 == "class" {
if (nextstate != "CLASS")
{
printf("Parse error: Unexpected class definition on line %d\n", NR);
- next;
+ next;
}
if ($2 in class_found)
{
printf("Duplicate class definition for %s on line %d.\n", $2, NR);
next;
- }
+ }
class_found[$2] = 1;
class_value++;
printf("#define SECCLASS_%s", toupper($2)) > outfile;
- for (i = 0; i < 40 - length($2); i++)
- printf(" ") > outfile;
- printf("%d\n", class_value) > outfile;
+ for (i = 0; i < 40 - length($2); i++)
+ printf(" ") > outfile;
+ printf("%d\n", class_value) > outfile;
printf(" S_(\"%s\")\n", $2) > debugfile;
}
-$1 == "sid" {
+$1 == "sid" {
if (nextstate == "CLASS")
{
nextstate = "SID";
- printf("\n/*\n * Security identifier indices for initial entities\n */\n") > outfile;
+ printf("\n/*\n * Security identifier indices for initial entities\n */\n") > outfile;
}
if ($2 in sid_found)
{
printf("Duplicate SID definition for %s on line %d.\n", $2, NR);
next;
- }
+ }
sid_found[$2] = 1;
sid_value++;
printf("#define SECINITSID_%s", toupper($2)) > outfile;
- for (i = 0; i < 37 - length($2); i++)
- printf(" ") > outfile;
- printf("%d\n", sid_value) > outfile;
+ for (i = 0; i < 37 - length($2); i++)
+ printf(" ") > outfile;
+ printf("%d\n", sid_value) > outfile;
printf(" \"%s\",\n", $2) > debugfile2;
}
END {
printf("Parse error: Unexpected end of file\n");
printf("\n#define SECINITSID_NUM") > outfile;
- for (i = 0; i < 34; i++)
- printf(" ") > outfile;
- printf("%d\n", sid_value) > outfile;
+ for (i = 0; i < 34; i++)
+ printf(" ") > outfile;
+ printf("%d\n", sid_value) > outfile;
printf("\n#endif /* __XEN__ || __XEN_TOOLS__ */\n") > outfile;
printf("\n#endif\n") > outfile;
printf("};\n\n") > debugfile2;