[apparmor] [PATCH 3/5] parser: Test dbus eavesdrop rule parsing

Seth Arnold seth.arnold at canonical.com
Fri Dec 6 02:14:35 UTC 2013


On Tue, Nov 19, 2013 at 06:16:23PM -0800, Tyler Hicks wrote:
> Make the dbus rule generator knowledgeable of the eavesdrop permission.
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

> ---
>  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 a5fc2b4..1fe5810 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"], [""], [""], [""],
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20131205/78567d1a/attachment.pgp>


More information about the AppArmor mailing list