2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 01:57:43 +00:00

Split priority rules with unsafe keyword to separate tests

This helps to limit the amount of rules skipped in the utils tests
(because the utils don't support the `unsafe` keyword)
This commit is contained in:
Christian Boltz 2025-05-05 20:53:53 +02:00
parent 71ea87966a
commit 94c5cf047f
No known key found for this signature in database
GPG Key ID: C6A682EA63C82F1C
5 changed files with 27 additions and 12 deletions

View File

@ -15,10 +15,5 @@
priority=-1 file ux /foo3, priority=-1 file ux /foo3,
priority=-1 file Ux /foo4, priority=-1 file Ux /foo4,
priority=-1 file ix /foo5, priority=-1 file ix /foo5,
priority=-1 file unsafe px /foo6,
priority=-1 file unsafe Px /foo7,
priority=-1 file unsafe ux /foo8,
priority=-1 file unsafe Ux /foo9,
priority=-1 file unsafe ix /foo10,
} }

View File

@ -15,10 +15,5 @@
priority=-1 ux /foo3, priority=-1 ux /foo3,
priority=-1 Ux /foo4, priority=-1 Ux /foo4,
priority=-1 ix /foo5, priority=-1 ix /foo5,
priority=-1 unsafe px /foo6,
priority=-1 unsafe Px /foo7,
priority=-1 unsafe ux /foo8,
priority=-1 unsafe Ux /foo9,
priority=-1 unsafe ix /foo10,
} }

View File

@ -0,0 +1,12 @@
#
#=DESCRIPTION perms before pathname + unsafe keyword
#=EXRESULT PASS
#
/usr/bin/foo {
priority=-1 file unsafe px /foo6,
priority=-1 file unsafe Px /foo7,
priority=-1 file unsafe ux /foo8,
priority=-1 file unsafe Ux /foo9,
priority=-1 file unsafe ix /foo10,
}

View File

@ -0,0 +1,13 @@
#
#=DESCRIPTION perms before pathname + unsafe keyword
#=EXRESULT PASS
#
/usr/bin/foo {
priority=-1 unsafe px /foo6,
priority=-1 unsafe Px /foo7,
priority=-1 unsafe ux /foo8,
priority=-1 unsafe Ux /foo9,
priority=-1 unsafe ix /foo10,
}

View File

@ -251,8 +251,8 @@ unknown_line = (
'file/file/front_perms_ok_2.sd', 'file/file/front_perms_ok_2.sd',
'file/front_perms_ok_2.sd', 'file/front_perms_ok_2.sd',
'xtrans/simple_ok_cx_1.sd', 'xtrans/simple_ok_cx_1.sd',
'file/priority/front_perms_ok_1.sd', 'file/priority/front_perms_ok_3.sd',
'file/priority/front_perms_ok_2.sd', 'file/priority/front_perms_ok_4.sd',
# owner / audit {...} blocks # owner / audit {...} blocks
'file/file/owner/ok_1.sd', 'file/file/owner/ok_1.sd',