On 2013-09-12 12:52:23, Steve Beattie wrote: > On Thu, Sep 12, 2013 at 12:40:47PM -0700, Steve Beattie wrote: > > On Wed, Sep 11, 2013 at 01:47:41AM -0700, Tyler Hicks wrote: > > > From: John Johansen <john.johan...@canonical.com> > > > > > > Signed-off-by: John Johansen <john.johan...@canonical.com> > > > > Acked-by: Steve Beattie <st...@nxnw.org> as it's a nice cleanup as is, > > but Tyler, I noticed that in merging in against the dbus code already > > committed, you didn't make the same opt_prefix simplification for > > 'dbus_rule' as John did for e.g. 'mnt_rule' or 'capability'. One of > > us should probably do that (I can if you're busy with other things). > > In fact, here's what I think such a patch would look like: > > Subject: parser - finish prefix refactoring for dbus rules > > Signed-off-by: Steve Beattie <st...@nxnw.org>
Thanks! I verified that the parser tests still pass. Acked-by: Tyler Hicks <tyhi...@canonical.com> This doesn't conflict with any of the other C++ patches, so I think it is safe to commit it to trunk when you get a chance. Tyler > --- > parser/parser_yacc.y | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) > > Index: b/parser/parser_yacc.y > =================================================================== > --- a/parser/parser_yacc.y > +++ b/parser/parser_yacc.y > @@ -667,19 +667,13 @@ rules: rules opt_prefix mnt_rule > $$ = $1; > } > > -rules: rules opt_audit_flag TOK_DENY dbus_rule > +rules: rules opt_prefix dbus_rule > { > - $4->deny = $4->mode; > - if ($2) > - $4->audit = $4->mode; > - $4->next = $1->dbus_ents; > - $1->dbus_ents = $4; > - $$ = $1; > - } > - > -rules: rules opt_audit_flag dbus_rule > - { > - if ($2) > + if ($2.owner) > + yyerror(_("owner prefix not allow on dbus rules")); > + if ($2.deny) > + $3->deny = $3->mode; > + if ($2.audit) > $3->audit = $3->mode; > $3->next = $1->dbus_ents; > $1->dbus_ents = $3; > > -- > Steve Beattie > <sbeat...@ubuntu.com> > http://NxNW.org/~steve/ > -- > AppArmor mailing list > AppArmor@lists.ubuntu.com > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/apparmor
signature.asc
Description: Digital signature
-- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor