[apparmor] [patch 10/12] parser: add basic alternation tests, along with their file and owner equivalents. (v2)

Seth Arnold seth.arnold at canonical.com
Tue Dec 10 07:17:58 UTC 2013


On Tue, Dec 03, 2013 at 12:12:26PM -0800, Steve Beattie wrote:
> This patch verifies basic alternation usage.
> 
> Patch history:
>   v1: initial revision
>   v2: mark nested alternation tests as passing, as it was deemed a bug
>       that the parser didn't support them.
> 
> Signed-off-by: Steve Beattie <steve at nxnw.org>

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

Thanks

> ---
>  parser/tst/simple_tests/file/file/ok_alternations_1.sd  |    7 +++++++
>  parser/tst/simple_tests/file/file/ok_alternations_2.sd  |    7 +++++++
>  parser/tst/simple_tests/file/ok_alternations_1.sd       |    7 +++++++
>  parser/tst/simple_tests/file/ok_alternations_2.sd       |    7 +++++++
>  parser/tst/simple_tests/file/owner/ok_alternations_1.sd |    7 +++++++
>  parser/tst/simple_tests/file/owner/ok_alternations_2.sd |    7 +++++++
>  6 files changed, 42 insertions(+)
> 
> Index: b/parser/tst/simple_tests/file/ok_alternations_2.sd
> ===================================================================
> --- /dev/null
> +++ b/parser/tst/simple_tests/file/ok_alternations_2.sd
> @@ -0,0 +1,7 @@
> +#
> +#=Description basic file rule w/nested alternations
> +#=EXRESULT PASS
> +#
> +/usr/bin/foo {
> +  /a/b/c/**{cache,data,download,/ext,file{admin,s},images,joomla,moodledata/sessions}/** rw,
> +}
> Index: b/parser/tst/simple_tests/file/file/ok_alternations_1.sd
> ===================================================================
> --- /dev/null
> +++ b/parser/tst/simple_tests/file/file/ok_alternations_1.sd
> @@ -0,0 +1,7 @@
> +#
> +#=Description basic file rule w/alternations
> +#=EXRESULT PASS
> +#
> +/usr/bin/foo {
> +  file /a/b/c/**{cache,data,download,/ext,fileadmin,files,images,joomla,moodledata/sessions}/** rw,
> +}
> Index: b/parser/tst/simple_tests/file/ok_alternations_1.sd
> ===================================================================
> --- /dev/null
> +++ b/parser/tst/simple_tests/file/ok_alternations_1.sd
> @@ -0,0 +1,7 @@
> +#
> +#=Description basic file rule w/alternations
> +#=EXRESULT PASS
> +#
> +/usr/bin/foo {
> +  /a/b/c/**{cache,data,download,/ext,fileadmin,files,images,joomla,moodledata/sessions}/** rw,
> +}
> Index: b/parser/tst/simple_tests/file/file/ok_alternations_2.sd
> ===================================================================
> --- /dev/null
> +++ b/parser/tst/simple_tests/file/file/ok_alternations_2.sd
> @@ -0,0 +1,7 @@
> +#
> +#=Description basic file rule w/nested alternations
> +#=EXRESULT PASS
> +#
> +/usr/bin/foo {
> +  file /a/b/c/**{cache,data,download,/ext,file{admin,s},images,joomla,moodledata/sessions}/** rw,
> +}
> Index: b/parser/tst/simple_tests/file/owner/ok_alternations_2.sd
> ===================================================================
> --- /dev/null
> +++ b/parser/tst/simple_tests/file/owner/ok_alternations_2.sd
> @@ -0,0 +1,7 @@
> +#
> +#=Description basic file rule w/nested alternations
> +#=EXRESULT PASS
> +#
> +/usr/bin/foo {
> +  owner /a/b/c/**{cache,data,download,/ext,file{admin,s},images,joomla,moodledata/sessions}/** rw,
> +}
> Index: b/parser/tst/simple_tests/file/owner/ok_alternations_1.sd
> ===================================================================
> --- /dev/null
> +++ b/parser/tst/simple_tests/file/owner/ok_alternations_1.sd
> @@ -0,0 +1,7 @@
> +#
> +#=Description basic file rule w/alternations
> +#=EXRESULT PASS
> +#
> +/usr/bin/foo {
> +  owner /a/b/c/**{cache,data,download,/ext,fileadmin,files,images,joomla,moodledata/sessions}/** rw,
> +}
-------------- 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/20131209/f73559ee/attachment.pgp>


More information about the AppArmor mailing list