mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
tests: Adjust query_label.sh to query a different profile
The test program was querying its own profile. Adjust the profile generation so that a separate profile is generated and have query_label query the separate profile. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
a566935d64
commit
afde1cc53a
1 changed files with 7 additions and 3 deletions
|
@ -23,7 +23,8 @@ settest query_label
|
|||
|
||||
expect=""
|
||||
perms=""
|
||||
label="--label=$test"
|
||||
qprof="/profile/to/query"
|
||||
label="--label=$qprof"
|
||||
|
||||
dbus_send="--dbus=send"
|
||||
dbus_receive="--dbus=receive"
|
||||
|
@ -35,13 +36,16 @@ dbus_none="--dbus="
|
|||
dbus_msg_query="session com.foo.bar /usr/bin/bar /com/foo/bar com.foo.bar Method"
|
||||
dbus_svc_query="session com.foo.baz"
|
||||
|
||||
# Generate a profile for $test, granting all file access and anything specified
|
||||
# in $@
|
||||
# Generate a profile for $test, granting all file accesses, and $qprof,
|
||||
# granting anything specified in $@.
|
||||
genqueryprofile()
|
||||
{
|
||||
genprofile --stdin <<EOF
|
||||
$test {
|
||||
file,
|
||||
}
|
||||
|
||||
$qprof {
|
||||
$@
|
||||
}
|
||||
EOF
|
||||
|
|
Loading…
Add table
Reference in a new issue