mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00:00
Test suite: don't use fragile shell construct mixing string and array
The previous code happened to work only because we always pass either 0 or 1 arguments to these functions. If we ever passed them 2+ arguments, unexpected things would happen. For details, see https://www.shellcheck.net/wiki/SC2145
This commit is contained in:
parent
fb94661937
commit
14d35c651c
@ -14,7 +14,7 @@ ${__dbus_var_decl}
|
|||||||
$test {
|
$test {
|
||||||
@{gen $test}
|
@{gen $test}
|
||||||
unix,
|
unix,
|
||||||
$@
|
$*
|
||||||
signal receive peer=unconfined,
|
signal receive peer=unconfined,
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
@ -33,7 +33,7 @@ confined_args="--log=$confined_log $listnames"
|
|||||||
message_gendbusprofile()
|
message_gendbusprofile()
|
||||||
{
|
{
|
||||||
gendbusprofile "${confined_log} w,
|
gendbusprofile "${confined_log} w,
|
||||||
$@"
|
$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_bus
|
start_bus
|
||||||
|
@ -62,7 +62,7 @@ service_runchecktest()
|
|||||||
service_gendbusprofile()
|
service_gendbusprofile()
|
||||||
{
|
{
|
||||||
gendbusprofile "$unconfined_log w,
|
gendbusprofile "$unconfined_log w,
|
||||||
$@"
|
$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_bus
|
start_bus
|
||||||
|
@ -63,7 +63,7 @@ ur_gendbusprofile()
|
|||||||
{
|
{
|
||||||
gendbusprofile "$confined_log w,
|
gendbusprofile "$confined_log w,
|
||||||
dbus bind bus=$bus name=$dest,
|
dbus bind bus=$bus name=$dest,
|
||||||
$@"
|
$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_bus
|
start_bus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user