2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-03 07:45:50 +00:00

Check for mount rules with multiple 'fstype'

... and adjust the tools to raise an exception if such a rule is found.
While this is not nice, it's better than the previous behaviour where
only the last 'fstype' was kept, and the others were lost when writing
the rule.
This commit is contained in:
Christian Boltz
2025-04-06 14:33:56 +02:00
parent 171e0b1fa9
commit b5894687ed
4 changed files with 36 additions and 5 deletions

View File

@@ -425,8 +425,10 @@ syntax_failure = (
'file/file/ok_embedded_spaces_4.sd', # \-escaped space
'file/ok_quoted_4.sd', # quoted string including \"
# mount rules with multiple 'options' are not supported by the tools yet, and when writing them, only the last 'options' would survive. Therefore MountRule intentionally raises an exception when parsing such a rule.
'mount/ok_opt_87.sd',
# mount rules with multiple 'options' or 'fstype' are not supported by the tools yet, and when writing them, only the last 'options'/'fstype' would survive.
# Therefore MountRule intentionally raises an exception when parsing such a rule.
'mount/ok_opt_87.sd', # multiple options
'mount/ok_opt_88.sd', # multiple fstype
# misc
'vars/vars_dbus_12.sd', # AARE starting with {{ are not handled