[apparmor] [PATCH 3/5] Combine hat and local profile parsing intothe same base rule as profile parsing.
Seth Arnold
seth.arnold at gmail.com
Tue Nov 23 09:38:44 GMT 2010
Please forgive my rubbish quoting.
+local_profile: TOK_PROFILE profile_base
+{
+
+struct codomain *cod = $2;
+
+if ($2)
+PDEBUG("Matched: local profile %s { ... }\n", cod->name);
+cod->local = 1;
+$$ = cod;
+};
+
+hat: hat_start profile_base
+{
+struct codomain *cod = $2;
+if ($2)
+PDEBUG("Matched: hat %s { ... }\n", code->name);
+
+cod->flags.hat = 1;
+$$ = cod;
};
If $2 isn't true, cod->local = 1; or cod->flags.hat = 1; will blow up mightily, may as well remove the conditional?
Thanks
More information about the AppArmor
mailing list