mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
parser: add dbus path slash filtering equality tests
Test to ensure that slash filtering occurs properly in dbus path components. Signed-off-by: Steve Beattie <steve.beattie@canonical.com> MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/607 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
9cee676558
commit
80d7e33432
1 changed files with 18 additions and 0 deletions
|
@ -263,6 +263,24 @@ verify_binary_equality "dbus minimization found in dbus abstractions" \
|
|||
peer=(name=org.freedesktop.DBus),
|
||||
dbus send bus=session, }"
|
||||
|
||||
# verify slash filtering for dbus paths.
|
||||
verify_binary_equality "dbus slash filtering for paths" \
|
||||
"/t { dbus (send, receive) path=/com/foo, dbus (send, receive) path=/com/bar, }" \
|
||||
"/t { dbus (send, receive) path=/com///foo, dbus (send, receive) path=///com/bar, }" \
|
||||
"/t { dbus (send, receive) path=/com//{foo,bar}, }" \
|
||||
"/t { dbus (send, receive) path={//com/foo,/com//bar}, }" \
|
||||
"@{FOO}=/foo
|
||||
/t { dbus (send, receive) path=/com/@{FOO}, dbus (send, receive) path=/com/bar, }" \
|
||||
"@{FOO}=/foo /bar
|
||||
/t { dbus (send, receive) path=/com/@{FOO}, }" \
|
||||
"@{FOO}=/bar //foo
|
||||
/t { dbus (send, receive) path=/com/@{FOO}, }" \
|
||||
"@{FOO}=//{bar,foo}
|
||||
/t { dbus (send, receive) path=/com/@{FOO}, }" \
|
||||
"@{FOO}=/foo
|
||||
@{BAR}=bar
|
||||
/t { dbus (send, receive) path=/com/@{FOO}, dbus (send, receive) path=/com//@{BAR}, }"
|
||||
|
||||
# Rules compatible with audit, deny, and audit deny
|
||||
# note: change_profile does not support audit/allow/deny atm
|
||||
for rule in "capability" "capability mac_admin" \
|
||||
|
|
Loading…
Add table
Reference in a new issue