mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-04 08:15:21 +00:00
Move the "unsafe" rules of front_perms_ok simple tests to separate test file
This enables us to exercise the front perms parse logic in the utils rule parsing through the simple tests as well Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
@@ -15,10 +15,5 @@
|
|||||||
file ux /foo3,
|
file ux /foo3,
|
||||||
file Ux /foo4,
|
file Ux /foo4,
|
||||||
file ix /foo5,
|
file ix /foo5,
|
||||||
file unsafe px /foo6,
|
|
||||||
file unsafe Px /foo7,
|
|
||||||
file unsafe ux /foo8,
|
|
||||||
file unsafe Ux /foo9,
|
|
||||||
file unsafe ix /foo10,
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
13
parser/tst/simple_tests/file/file/front_perms_ok_2.sd
Normal file
13
parser/tst/simple_tests/file/file/front_perms_ok_2.sd
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#
|
||||||
|
#=DESCRIPTION perms before pathname with unsafe keyword
|
||||||
|
#=EXRESULT PASS
|
||||||
|
#
|
||||||
|
/usr/bin/foo {
|
||||||
|
|
||||||
|
file unsafe px /foo6,
|
||||||
|
file unsafe Px /foo7,
|
||||||
|
file unsafe ux /foo8,
|
||||||
|
file unsafe Ux /foo9,
|
||||||
|
file unsafe ix /foo10,
|
||||||
|
|
||||||
|
}
|
@@ -14,10 +14,5 @@
|
|||||||
ux /foo3,
|
ux /foo3,
|
||||||
Ux /foo4,
|
Ux /foo4,
|
||||||
ix /foo5,
|
ix /foo5,
|
||||||
unsafe px /foo6,
|
|
||||||
unsafe Px /foo7,
|
|
||||||
unsafe ux /foo8,
|
|
||||||
unsafe Ux /foo9,
|
|
||||||
unsafe ix /foo10,
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
12
parser/tst/simple_tests/file/front_perms_ok_2.sd
Normal file
12
parser/tst/simple_tests/file/front_perms_ok_2.sd
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
#=DESCRIPTION perms before pathname with unsafe keyword
|
||||||
|
#=EXRESULT PASS
|
||||||
|
#
|
||||||
|
/usr/bin/foo {
|
||||||
|
unsafe px /foo6,
|
||||||
|
unsafe Px /foo7,
|
||||||
|
unsafe ux /foo8,
|
||||||
|
unsafe Ux /foo9,
|
||||||
|
unsafe ix /foo10,
|
||||||
|
|
||||||
|
}
|
@@ -248,11 +248,11 @@ unknown_line = (
|
|||||||
'file/ok_other_3.sd',
|
'file/ok_other_3.sd',
|
||||||
|
|
||||||
# 'unsafe' keyword
|
# 'unsafe' keyword
|
||||||
'file/file/front_perms_ok_1.sd',
|
'file/file/front_perms_ok_2.sd',
|
||||||
'file/front_perms_ok_1.sd',
|
'file/front_perms_ok_2.sd',
|
||||||
'xtrans/simple_ok_cx_1.sd',
|
'xtrans/simple_ok_cx_1.sd',
|
||||||
|
|
||||||
# permissions before path and owner / audit {...} blocks
|
# owner / audit {...} blocks
|
||||||
'file/file/owner/ok_1.sd',
|
'file/file/owner/ok_1.sd',
|
||||||
'file/owner/ok_1.sd',
|
'file/owner/ok_1.sd',
|
||||||
'profile/entry_mods_audit_ok1.sd',
|
'profile/entry_mods_audit_ok1.sd',
|
||||||
|
Reference in New Issue
Block a user