From d5ee5d0c6535f992fce02b66598dfc3719a703bf Mon Sep 17 00:00:00 2001 From: Tyler Hicks Date: Fri, 6 Dec 2013 11:18:48 -0800 Subject: [PATCH] parser: Test dbus eavesdrop rule parsing Make the dbus rule generator knowledgeable of the eavesdrop permission. Signed-off-by: Tyler Hicks Acked-by: Seth Arnold --- parser/tst/gen-dbus.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/parser/tst/gen-dbus.pl b/parser/tst/gen-dbus.pl index a5fc2b43b..1fe581081 100755 --- a/parser/tst/gen-dbus.pl +++ b/parser/tst/gen-dbus.pl @@ -49,11 +49,15 @@ gen_files("message-rules", "PASS", \@quantifier, \@msg_perms, \@session, [""], \@path, \@interface, \@member, \@peer); gen_files("service-rules", "PASS", \@quantifier, ["bind"], \@session, \@name, [""], [""], [""], [""]); +gen_files("eavesdrop-rules", "PASS", \@quantifier, ["eavesdrop"], \@session, + [""], [""], [""], [""], [""]); gen_file("sloppy-formatting", "PASS", "", "(send , receive )", "bus=session", "", "path =\"/foo/bar\"", "interface = com.foo", " member=bar", "peer =( label= /usr/bin/app name =\"com.foo\")"); gen_file("sloppy-formatting", "PASS", "", "bind", "bus =session", "name= com.foo", "", "", "", ""); +gen_file("sloppy-formatting", "PASS", "", "eavesdrop", "bus = system", + "", "", "", "", ""); # Don't use the first element, which is empty, from each array since all empty # conditionals would PASS but we want all FAILs @@ -73,6 +77,8 @@ gen_files("service-incompat", "FAIL", \@quantifier, ["bind"], \@session, \@name, [""], [""], \@member, [""]); gen_files("service-incompat", "FAIL", \@quantifier, ["bind"], \@session, \@name, [""], [""], [""], \@peer); +gen_files("eavesdrop-incompat", "FAIL", \@quantifier, ["eavesdrop"], \@session, + \@name, \@path, \@interface, \@member, \@peer); gen_files("pairing-unsupported", "FAIL", \@quantifier, ["send", "bind"], \@session, ["name=sn", "label=sl"], [""], [""], [""],